脚本下载地址:
http://down.51cto.com/data/156516
由于fecru用rc.local是无法自启动的,所以这里附上fecru的启动脚本
将以下脚本拷贝到/etc/init.d/fecrud
# cd /etc/init.d/
# vi fecrud
注意:以下几个变量要根据自己的位置来调整Fecru,JAVA_HOME
-------------------------------------------------------------------------------------#!/bin/bash
### BEGIN INIT INFO
# chkconfig: 2345 85 15
# Provides: atlassian
# Short-Description: Start and stop the Fecru server
# Description: Start and stop the Fecru server.
### END INIT INFO
#
. /etc/init.d/functions
Fecru=/www/atlassian/fecru/2.4.3
startup=$Fecru/bin/start.sh
shutdown=$Fecru/bin/stop.sh
export JAVA_HOME=/usr/local/java/jdk1.6.0_22
start(){
echo -n $"Starting Fecru"
#daemon -c
$startup
RETVAL=$?
echo
}
stop(){
echo $"Stopping Fecru"
$shutdown
RETVAL=$?
echo
}
restart(){
stop
sleep 10
start
}
status(){
numproc=`ps -ef | grep fecru | grep -v "grep fecru" | wc -l`
if [ $numproc -gt 0 ]; then
echo "Fecru is running..."
else
echo "Fecru is stopped..."
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
numproc=`ps -ef | grep fecru | grep -v "grep fecru" | wc -l`
if [ $numproc -gt 0 ]; then
echo "Fecru is running..."
else
echo "Fecru 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 fecrud on
# service fecrud start
没有报错即成功