3 daemon_name
=convergence
7 .
/etc
/conf.d
/$daemon_name.conf
10 pidof
-x -o %PPID convergence-notary
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
22 convergence-notary
-p $PORT -s $SPORT -c $CERTFILE -k $KEYFILE -u $USER -g $GROUP
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}"
71 # vim:set ts=2 sw=2 et: