summaryrefslogtreecommitdiffstats
path: root/main/rp-pppoe/rp-pppoe.initd
blob: 3e6ce3edbaaad879ffe540df08c0fda67f07779e (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
#!/sbin/runscript

depend() {
	need net
}

start() {
	ebegin "Starting PPPOE Server"
	test -x /usr/sbin/pppoe-server -a -f /etc/ppp/pppoe-server-options || exit 0
	start-stop-daemon --start --exec /usr/sbin/pppoe-server -- ${PPPOE_PARAMS}
	echo 1 > /proc/sys/net/ipv4/ip_forward
	eend $?
}

stop () {
	ebegin "Stopping PPPOE Server"
	start-stop-daemon --stop --exec /usr/sbin/pppoe-server
	echo 0 > /proc/sys/net/ipv4/ip_forward
	eend $?
}

restart () {
        ebegin "Restarting PPPOE Server"
        start-stop-daemon --stop --exec /usr/sbin/pppoe-server
        sleep 1
        start-stop-daemon --start --exec /usr/sbin/pppoe-server -- ${PPPOE_PARAMS}
        echo 1 > /proc/sys/net/ipv4/ip_forward
        echo "."
}