#! /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
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
#
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