6 PIDFILE
="/var/run/cruisecontrol.pid"
7 PID
=`cat $PIDFILE 2>/dev/null`
11 stat_busy
"Starting CruiseControl"
13 cd /opt
/cruisecontrol
/ && su cruisecontrol
-c '/opt/cruisecontrol/cruisecontrol.sh &>/var/log/cruisecontrol.log'
15 PID
=`cat $PIDFILE 2>/dev/null`
16 ps
-p $PID &>/dev
/null
18 if [ -z "$PID" -o $?
-gt 0 ]; then
21 add_daemon cruisecontrol
26 stat_busy
"Stopping CruiseControl"
28 [ ! -z "$PID" ] && kill $PID &>/dev
/null
33 rm_daemon cruisecontrol
43 echo "usage: $0 {start|stop|restart}"