8 prog
="cd $SQUEEZEBOX_HOME; ./slimserver.pl $SQUEEZEBOX_ARGS"
10 PID
=$
(pgrep slimserver.pl
)
14 stat_busy
"Starting $name daemon"
15 [[ -z "$PID" ]] && eval $prog \
16 && { add_daemon
$name; stat_done
; } \
17 ||
{ stat_fail
; exit 1; }
20 stat_busy
"Stopping $name daemon"
21 [[ -n "$PID" ]] && kill $PID &>/dev
/null \
22 && { rm_daemon
$name; stat_done
; } \
23 ||
{ stat_fail
; exit 1; }
31 echo "usage: $0 {start|stop|restart|reload}"