diff -r 8d116efc6867 -r a9b77650cbc4 rc.wgnd-watch.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rc.wgnd-watch.in Thu May 03 13:33:14 2012 +0200 @@ -0,0 +1,38 @@ +#! /bin/sh + +### BEGIN INIT INFO +# Provides: wgnd-watch +# Required-Start: $local_fs $remote_fs $syslog $named $network $time +# Required-Stop: $local_fs $remote_fs $syslog $named $network +# Should-Start: +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/Stop the wgnd-watch daemon +### END INIT INFO + +DAEMON=__sbindir__/wgnd-watch +PIDFILE=/var/run/`basename $DAEMON`.pid + +case $1 in + + start) + start-stop-daemon -v --start --pidfile $PIDFILE --startas $DAEMON + ;; + + stop) + start-stop-daemon -v --stop --retry 30 --pidfile $PIDFILE + ;; + + restart) echo "Restarting $NAME..." + $0 stop + $0 start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0