summaryrefslogtreecommitdiff
path: root/package/radvd/files/radvd.init
diff options
context:
space:
mode:
Diffstat (limited to 'package/radvd/files/radvd.init')
-rw-r--r--package/radvd/files/radvd.init24
1 files changed, 24 insertions, 0 deletions
diff --git a/package/radvd/files/radvd.init b/package/radvd/files/radvd.init
new file mode 100644
index 0000000000..2d9e500090
--- /dev/null
+++ b/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