3 # Author: Sean Groarke, sgroarke@gmail.com>
4 # Modifier: Justin Wong, justin.w.xd@gmail.com
5 # $HeadURL: https://npd6.googlecode.com/svn/trunk/etc/npd6 $
6 # $Id: npd6 51 2011-08-03 11:14:38Z npd6Project $
14 pidof
-o %PPID
$daemon_name
19 stat_busy
"Starting $daemon_name daemon"
21 if [ -z "$PID" ]; then
22 [ -f /var
/run
/$daemon_name.pid
] && rm -f /var
/run
/$daemon_name.pid
30 echo $
(get_pid
) > /var
/run
/$daemon_name.pid
31 add_daemon
$daemon_name
40 stat_busy
"Stopping $daemon_name daemon"
43 [ ! -z "$PID" ] && kill $PID &> /dev
/null
49 rm -f /var
/run
/$daemon_name.pid
&> /dev
/null
50 rm_daemon
$daemon_name
62 stat_busy
"Checking $daemon_name status";
63 ck_status
$daemon_name
67 echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2