4 # skeleton example file to build /etc/init.d/ scripts.
5 # This file should be used to construct scripts for /etc/init.d.
7 # Written by Miquel van Smoorenburg <miquels@cistron.nl>.
8 # Modified for Debian GNU/Linux
9 # by Ian Murdock <imurdock@gnu.ai.mit.edu>.
11 # Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl
16 # Required-Start: $network $local_fs $remote_fs
17 # Required-Stop: $network $local_fs $remote_fs
18 # Default-Start: 2 3 4 5
20 # Short-Description: Start and stop secnet
21 # Description: secnet is a VPN server.
26 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
27 DAEMON=/usr/sbin/secnet
31 test -f $DAEMON || exit 0
33 . /lib/lsb/init-functions
35 test -f /etc/secnet/secnet.conf || exit 0
36 test -f /etc/default/secnet && . /etc/default/secnet
38 [ "X$RUN_SECNET" = "Xyes" ] || exit 0
42 echo -n "Starting $DESC: "
43 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
48 echo -n "Stopping $DESC: "
49 start-stop-daemon --stop --quiet --oknodo --pidfile \
50 /var/run/$NAME.pid --exec $DAEMON
55 # If the daemon can reload its config files on the fly
56 # for example by sending it SIGHUP, do it here.
58 # If the daemon responds to changes in its config file
59 # directly anyway, make this a do-nothing entry.
61 # echo "Reloading $DESC configuration files."
62 # start-stop-daemon --stop --signal 1 --quiet --pidfile \
63 # /var/run/$NAME.pid --exec $DAEMON
67 # If the "reload" option is implemented, move the "force-reload"
68 # option to the "reload" entry above. If not, "force-reload" is
69 # just the same as "restart".
71 echo -n "Restarting $DESC: "
72 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
75 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
81 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
82 echo "Usage: $N {start|stop|restart|force-reload}" >&2