4 # Provides: xl2tpd l2tpd
5 # Required-Start: $network $syslog $remote_fs
6 # Required-Stop: $network $syslog $remote_fs
9 # Default-Start: 2 3 4 5
11 # Short-Description: layer 2 tunelling protocol daemon
12 # Description: xl2tpd is usually used in conjunction with an ipsec
13 # daemon (such as openswan).
16 PATH
=/usr
/local
/sbin
:/usr
/local
/bin
:/sbin
:/bin
:/usr
/sbin
:/usr
/bin
17 DAEMON
=/usr
/sbin
/xl2tpd
21 test -x $DAEMON ||
exit 0
23 # Include xl2tpd defaults if available
24 if [ -f /etc
/default
/xl2tpd
] ; then
28 PIDFILE
=/var
/run
/$NAME.pid
34 echo -n "Starting $DESC: "
35 test -d ${XL2TPD_RUN_DIR:-/var/run/xl2tpd} || mkdir
-p ${XL2TPD_RUN_DIR:-/var/run/xl2tpd}
36 start-stop-daemon
--start --quiet --pidfile $PIDFILE \
37 --exec $DAEMON -- $DAEMON_OPTS
41 echo -n "Stopping $DESC: "
42 start-stop-daemon
--oknodo --stop --quiet --pidfile $PIDFILE \
47 test -d ${XL2TPD_RUN_DIR:-/var/run/xl2tpd} || mkdir
-p ${XL2TPD_RUN_DIR:-/var/run/xl2tpd}
48 # check whether $DAEMON is running. If so, restart
49 start-stop-daemon
--stop --test --quiet --pidfile \
50 $PIDFILE --exec $DAEMON \
55 test -d ${XL2TPD_RUN_DIR:-/var/run/xl2tpd} || mkdir
-p ${XL2TPD_RUN_DIR:-/var/run/xl2tpd}
56 echo -n "Restarting $DESC: "
57 start-stop-daemon
--stop --quiet --pidfile \
58 $PIDFILE --exec $DAEMON
60 start-stop-daemon
--start --quiet --pidfile \
61 $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
66 echo "Usage: $N {start|stop|restart|force-reload}" >&2