9 pidof
-o %PPID
$daemon_name
14 stat_busy
"Starting $daemon_name daemon"
17 if [ -z "$PID" ]; then
18 [ -f /var
/run
/$daemon_name.pid
] && rm -f /var
/run
/$daemon_name.pid
26 echo $
(get_pid
) > /var
/run
/$daemon_name.pid
27 add_daemon
$daemon_name
37 stat_busy
"Stopping $daemon_name daemon"
40 [ ! -z "$PID" ] && kill $PID &> /dev
/null
46 rm -f /var
/run
/$daemon_name.pid
&> /dev
/null
47 rm_daemon
$daemon_name
59 stat_busy
"Checking $daemon_name status";
60 ck_status
$daemon_name
64 echo "usage: $0 {start|stop|restart|status}"