由于confluence用rc.local是无法自启动的,所以这里附上confluence的启动脚本
将以下脚本拷贝到/etc/init.d/confluenced
# cd /etc/init.d/
# vi confluenced
注意:以下几个变量要根据自己的位置来调整Confluence,JAVA_HOME
-------------------------------------------------------------------------------------#!/bin/bash
### BEGIN INIT INFO
# chkconfig: 2345 85 15
# Provides: atlassian
# Short-Description: Start and stop the Jira&Confluence server
# Description: Start and stop the Jira&Confluence server.
### END INIT INFO
#
. /etc/init.d/functions
Confluence=/data/atlassian-confluence
startup=$Confluence/bin/startup.sh
shutdown=$Confluence/bin/shutdown.sh
export JAVA_HOME=/usr/local/jdk1.8.0_51
start(){
echo -n $"Starting Confluence"
#daemon -c
$startup
RETVAL=$?
echo
}
stop(){
echo $"Stopping Confluence"
$shutdown
RETVAL=$?
echo
}
restart(){
stop
start
}
status(){
numproc=`ps -ef | grep confluence | grep -v "grep confluence" | wc -l`
if [ $numproc -gt 0 ]; then
echo "Confluence is running..."
else
echo "Confluence is stopped..."
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
exit 1
esac
exit 0
-------------------------------------------------------------------------------------
# chkconfig --add confluenced
# chkconfig confluenced on
# service confluenced start
没有报错即成功