aboutsummaryrefslogtreecommitdiffstats
path: root/testing/pptpd/rcpptpd
blob: 83afd0ce76bcb8d249624e8827fb379d31076418 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
# Copyright (c) 2000-2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
#
# Author: Bernd Kaindl
#
# /etc/init.d/pptpd
#

### BEGIN INIT INFO
# Provides:       pptpd
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start:  3 5
# Default-Stop:
# Description:    start pptp daemon
# Short-Description: pptp daemon
### END INIT INFO

PPTPD_BIN=/usr/sbin/pptpd
test -x $PPTPD_BIN || exit 5

# Shell functions sourced from /etc/rc.status:
. /etc/rc.status

# First reset status of this service
rc_reset

case "$1" in
    start)
	echo -n "Starting MS VPN server pptpd"
	if modprobe ppp_mppe ; then
		startproc -sq $PPTPD_BIN
		rc_status -v
	else
		rc_failed 3
	fi
	;;
    stop)
	echo -n "Shutting down MS VPN server pptpd"
	killproc -TERM $PPTPD_BIN
	rc_status -v
	rmmod ppp_mppe > /dev/null 2>&1
	;;
    restart)
	$0 stop
	$0 start
	rc_status
	;;
    force-reload)
	$0 stop && $0 start
	rc_status
	;;
    reload)
	rc_failed 3
        rc_status -v
        ;;
    status)
	echo -n "Checking for MS VPN server pptpd: "
	checkproc $PPTPD_BIN
        rc_status -v
        ;;
    *)
	echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
	exit 1
	;;
esac
rc_exit