summaryrefslogtreecommitdiff
path: root/pptpd-1.3.3/debian/pptpd.init
diff options
context:
space:
mode:
Diffstat (limited to 'pptpd-1.3.3/debian/pptpd.init')
-rw-r--r--pptpd-1.3.3/debian/pptpd.init56
1 files changed, 56 insertions, 0 deletions
diff --git a/pptpd-1.3.3/debian/pptpd.init b/pptpd-1.3.3/debian/pptpd.init
new file mode 100644
index 0000000..6f6938d
--- /dev/null
+++ b/pptpd-1.3.3/debian/pptpd.init
@@ -0,0 +1,56 @@
+#!/bin/sh
+# Copyright Rene Mayrhofer, ViaNova, 1999
+# This script is distibuted under the GPL
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/pptpd
+PIDFILE=/var/run/pptpd.pid
+FLAGS="defaults 50"
+
+case "$1" in
+ start)
+ echo -n "Starting PPTP Daemon: "
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
+ -- < /dev/null > /dev/null
+ echo "pptpd."
+ ;;
+ stop)
+ echo -n "Stopping PPTP: "
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
+ echo "pptpd."
+ ;;
+ reload)
+ echo "Not implemented."
+ ;;
+ force-reload|restart)
+ echo "Restarting PPTP: "
+ sh $0 stop
+ sh $0 start
+ ;;
+ status)
+ if [ ! -r $PIDFILE ]; then
+ # no pid file, process doesn't seem to be running correctly
+ exit 3
+ fi
+ PID=`cat $PIDFILE | sed 's/ //g'`
+ EXE=/proc/$PID/exe
+ if [ -x "$EXE" ] &&
+ [ "`ls -l \"$EXE\" | cut -d'>' -f2,2 | cut -d' ' -f2,2`" = \
+ "$DAEMON" ]; then
+ # ok, process seems to be running
+ exit 0
+ elif [ -r $PIDFILE ]; then
+ # process not running, but pidfile exists
+ exit 1
+ else
+ # no lock file to check for, so simply return the stopped status
+ exit 3
+ fi
+ ;;
+ *)
+ echo "Usage: /etc/init.d/pptpd {start|stop|restart|force-reload|reload}"
+ exit 1
+ ;;
+esac
+
+exit 0