4 # This file is part of secnet.
5 # See LICENCE and CREDITS for full list of copyright holders.
6 # SPDX-License-Identifier: GPL-3.0-or-later
7 # There is NO WARRANTY.
11 # Required-Start: $network $local_fs $remote_fs
12 # Required-Stop: $network $local_fs $remote_fs
13 # Default-Start: 2 3 4 5
15 # Short-Description: Start and stop secnet
16 # Description: secnet is a VPN server.
21 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
22 DAEMON=/usr/sbin/secnet
26 test -f $DAEMON || exit 0
28 . /lib/lsb/init-functions
30 test -f /etc/secnet/secnet.conf || exit 0
31 test -f /etc/default/secnet && . /etc/default/secnet
33 [ "X$RUN_SECNET" = "Xyes" ] || exit 0
37 echo -n "Starting $DESC: "
38 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
43 echo -n "Stopping $DESC: "
44 start-stop-daemon --stop --quiet --oknodo --pidfile \
45 /var/run/$NAME.pid --exec $DAEMON
50 # If the daemon can reload its config files on the fly
51 # for example by sending it SIGHUP, do it here.
53 # If the daemon responds to changes in its config file
54 # directly anyway, make this a do-nothing entry.
56 # echo "Reloading $DESC configuration files."
57 # start-stop-daemon --stop --signal 1 --quiet --pidfile \
58 # /var/run/$NAME.pid --exec $DAEMON
62 # If the "reload" option is implemented, move the "force-reload"
63 # option to the "reload" entry above. If not, "force-reload" is
64 # just the same as "restart".
66 echo -n "Restarting $DESC: "
67 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
70 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
76 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
77 echo "Usage: $N {start|stop|restart|force-reload}" >&2