6 ARGS
="daemonise=true pidFile=/var/run/$DAEMON/$DAEMON.pid"
7 PID
=$
(pidof
-o %PPID
/usr
/bin
/$DAEMON)
11 stat_busy
"Starting $DAEMON"
12 if ck_daemon
$DAEMON; then
13 [[ ! -d /var
/run
/$DAEMON ]] && install -d $DAEMON /var
/run
/$DAEMON
14 /usr
/bin
/$DAEMON $ARGS >/dev
/null
2>&1
15 if [[ $?
!= 0 ]]; then
26 stat_busy
"Stopping $DAEMON"
27 if ! ck_daemon
$DAEMON; then
28 kill $PID >/dev
/null
2>&1
29 if [[ $?
!= 0 ]]; then
40 stat_busy
"Purging $DAEMON"
41 [[ ! -d /var
/run
/$DAEMON ]] && install -d $DAEMON /var
/run
/$DAEMON
42 if ! ck_daemon
$DAEMON; then
43 kill -USR1 $PID >/dev
/null
2>&1
45 /usr
/bin
/$DAEMON -x $ARGS >/dev
/null
2>&1 || stat_fail
46 kill -USR2 $PID >/dev
/null
2>&1
49 /usr
/bin
/$DAEMON -x $ARGS >/dev
/null
2>&1 || stat_fail
58 echo "usage: $0 {start|stop|restart|purge}"