summaryrefslogtreecommitdiffstats
path: root/openwrt/package/radvd/files/radvd.init
diff options
context:
space:
mode:
Diffstat (limited to 'openwrt/package/radvd/files/radvd.init')
-rw-r--r--openwrt/package/radvd/files/radvd.init24
1 files changed, 24 insertions, 0 deletions
diff --git a/openwrt/package/radvd/files/radvd.init b/openwrt/package/radvd/files/radvd.init
new file mode 100644
index 000000000..2d9e50009
--- /dev/null
+++ b/openwrt/package/radvd/files/radvd.init
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+case "$1" in
+ start)
+ echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+ mkdir -p /var/log
+ mkdir -p /var/run
+ /usr/sbin/radvd
+ ;;
+
+ stop)
+ killall radvd
+ echo 0 > /proc/sys/net/ipv6/conf/all/forwarding
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac