2007-02-16 19:11:48 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
2010-12-12 22:54:05 +01:00
|
|
|
DAEMON=/usr/sbin/xl2tpd
|
|
|
|
PIDFILE=/var/run/xl2tpd.pid
|
2007-02-16 19:11:48 +01:00
|
|
|
|
|
|
|
test -f $DAEMON || exit 0
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
2008-03-18 01:20:24 +01:00
|
|
|
start-stop-daemon -S -p $PIDFILE -x $DAEMON -- -D &
|
2007-02-16 19:11:48 +01:00
|
|
|
;;
|
|
|
|
stop)
|
2008-03-18 01:20:24 +01:00
|
|
|
start-stop-daemon -K -p $PIDFILE -x $DAEMON
|
2007-02-16 19:11:48 +01:00
|
|
|
;;
|
|
|
|
restart|force-reload)
|
2008-03-18 01:20:24 +01:00
|
|
|
start-stop-daemon -K -p $PIDFILE -x $DAEMON
|
2007-02-16 19:11:48 +01:00
|
|
|
sleep 1
|
2008-03-18 01:20:24 +01:00
|
|
|
start-stop-daemon -S -p $PIDFILE -x $DAEMON
|
2007-02-16 19:11:48 +01:00
|
|
|
;;
|
|
|
|
*)
|
2010-12-12 22:54:05 +01:00
|
|
|
echo "Usage: /etc/init.d/xl2tdp {start|stop|restart|force-reload}"
|
2007-02-16 19:11:48 +01:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|