summaryrefslogtreecommitdiffstats
path: root/main/rp-pppoe/rp-pppoe.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/rp-pppoe/rp-pppoe.initd')
-rw-r--r--main/rp-pppoe/rp-pppoe.initd30
1 files changed, 30 insertions, 0 deletions
diff --git a/main/rp-pppoe/rp-pppoe.initd b/main/rp-pppoe/rp-pppoe.initd
new file mode 100644
index 000000000..3e6ce3edb
--- /dev/null
+++ b/main/rp-pppoe/rp-pppoe.initd
@@ -0,0 +1,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 "."
+}
+