7 #. /etc/conf.d/$daemon_name.conf
10 pidof
-o %PPID
$daemon_name
15 stat_busy
"Starting $daemon_name daemon"
18 if [[ -z $PID ]]; then
19 [[ -f /var
/run
/$daemon_name.pid
]] &&
20 rm -f /var
/run
/$daemon_name.pid
24 if [[ $?
-gt 0 ]]; then
28 echo $
(get_pid
) > /var
/run
/$daemon_name.pid
29 add_daemon
$daemon_name
39 stat_busy
"Stopping $daemon_name daemon"
42 [[ -n $PID ]] && kill $PID &> /dev
/null
44 if [[ $?
-gt 0 ]]; then
48 rm -f /var
/run
/$daemon_name.pid
&> /dev
/null
49 rm_daemon
$daemon_name
61 stat_busy
"Checking $daemon_name status";
62 ck_status
$daemon_name
66 echo "usage: $0 {start|stop|restart|status}"