chiark / gitweb /
build system: add a .gitignore
[secnet.git] / debian / init
index c22b55f4c59392bdaf985a337c537cb55a2741db..18c273ab3e3345cbeb454fdab8e9150dfd78867f 100644 (file)
@@ -20,8 +20,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 +33,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)