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
] && rm -f /var
/run
/$daemon_name.pid
21 su swarmtv
-c "$daemon_name -r"
27 echo $
(get_pid
) > /var
/run
/$daemon_name.pid
28 add_daemon
$daemon_name
38 stat_busy
"Stopping $daemon_name daemon"
41 [ ! -z "$PID" ] && kill $PID &> /dev
/null
47 rm -f /var
/run
/$daemon_name.pid
&> /dev
/null
48 rm_daemon
$daemon_name
60 stat_busy
"Checking $daemon_name status";
61 ck_status
$daemon_name
65 echo "usage: $0 {start|stop|restart|status}"