8 [ -f /etc
/conf.d
/$daemon_name.conf
] && .
/etc
/conf.d
/$daemon_name.conf
11 pidof
-o %PPID
-x $daemon_name.pl
16 stat_busy
"Starting $daemon_name daemon"
19 if [[ -z $PID ]]; then
20 [[ -f /var
/run
/$daemon_name.pid
]] &&
21 rm -f /var
/run
/$daemon_name.pid
23 su
$USER -c /usr
/bin
/vendor_perl
/mdd.pl
25 if [[ $?
-gt 0 ]]; then
29 echo $
(get_pid
) > /var
/run
/$daemon_name.pid
30 add_daemon
$daemon_name
40 stat_busy
"Stopping $daemon_name daemon"
43 [[ -n $PID ]] && kill $PID &> /dev
/null
45 if [[ $?
-gt 0 ]]; then
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: $0 {start|stop|restart|status}"
72 # vim:set ts=2 sw=2 et: