chiark / gitweb /
changelog: start 0.6.8
[secnet.git] / debian / init
index 18c273ab3e3345cbeb454fdab8e9150dfd78867f..dc3ee70f0af5c4013079491ab7123aceeeefaa40 100644 (file)
@@ -1,15 +1,20 @@
 #! /bin/sh
 # /etc/init.d/secnet
 #
-# skeleton     example file to build /etc/init.d/ scripts.
-#              This file should be used to construct scripts for /etc/init.d.
-#
-#              Written by Miquel van Smoorenburg <miquels@cistron.nl>.
-#              Modified for Debian GNU/Linux
-#              by Ian Murdock <imurdock@gnu.ai.mit.edu>.
-#
-# Version:     @(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl
-#
+# This file is part of secnet.
+# See LICENCE and CREDITS for full list of copyright holders.
+# SPDX-License-Identifier: GPL-3.0-or-later
+# There is NO WARRANTY.
+
+### 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
 
@@ -19,6 +24,9 @@ NAME=secnet
 DESC="VPN server"
 
 test -f $DAEMON || exit 0
+
+. /lib/lsb/init-functions
+
 test -f /etc/secnet/secnet.conf || exit 0
 test -f /etc/default/secnet && . /etc/default/secnet
 
@@ -57,7 +65,7 @@ case "$1" in
        #
        echo -n "Restarting $DESC: "
        start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
-               --exec $DAEMON
+               --oknodo --exec $DAEMON
        sleep 1
        start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
                --exec $DAEMON