X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/8dea8d37a13fcc615daba3375809900f04a2e5a2..f23763998505b60352a2395bfae16da5cac2a978:/debian/init diff --git a/debian/init b/debian/init index c22b55f..8df268b 100644 --- a/debian/init +++ b/debian/init @@ -11,6 +11,16 @@ # Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl # +### BEGIN INIT INFO +# Provides: secnet +# Required-Start: $network $local_fs $remote_fs +# Required-Stop: $network $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start and stop secnet +# Description: secnet is a VPN server. +### END INIT INFO + set -e PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin @@ -20,8 +30,9 @@ DESC="VPN server" test -f $DAEMON || exit 0 test -f /etc/secnet/secnet.conf || exit 0 +test -f /etc/default/secnet && . /etc/default/secnet -set -e +[ "X$RUN_SECNET" = "Xyes" ] || exit 0 case "$1" in start) @@ -32,8 +43,8 @@ case "$1" in ;; stop) echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON + start-stop-daemon --stop --quiet --oknodo --pidfile \ + /var/run/$NAME.pid --exec $DAEMON echo "$NAME." ;; #reload)