diff options
Diffstat (limited to 'package/l2tp/l2tpd')
| -rwxr-xr-x | package/l2tp/l2tpd | 27 | 
1 files changed, 27 insertions, 0 deletions
diff --git a/package/l2tp/l2tpd b/package/l2tp/l2tpd new file mode 100755 index 000000000..0b51339f3 --- /dev/null +++ b/package/l2tp/l2tpd @@ -0,0 +1,27 @@ +#!/bin/sh +# +PATH=/bin:/usr/bin:/sbin:/usr/sbin +DAEMON=/usr/sbin/l2tpd +PIDFILE=/var/run/l2tpd.pid + +test -f $DAEMON || exit 0 + +case "$1" in +  start) +    start-stop-daemon --start  --pidfile $PIDFILE --exec $DAEMON -- -D & +    ;; +  stop) +    start-stop-daemon --stop  --pidfile $PIDFILE --exec $DAEMON +    ;; +  restart|force-reload) +    start-stop-daemon --stop  --pidfile $PIDFILE --exec $DAEMON  +    sleep 1 +    start-stop-daemon --start  --pidfile $PIDFILE --exec $DAEMON +    ;; +  *) +    echo "Usage: /etc/init.d/l2tdp {start|stop|restart|force-reload}" +    exit 1 +    ;; +esac + +exit 0  | 
