summaryrefslogtreecommitdiff
path: root/community/radvd/radvd.rc
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-04 00:01:47 +0000
committerroot <root@rshg054.dnsready.net>2012-03-04 00:01:47 +0000
commitf0fa42126da9e3eec6b98388b35c67929fa20dae (patch)
tree0a4ad5b073e8500ff0e8920ba509942598576463 /community/radvd/radvd.rc
parentd8fb549de0ef3299436c448f7b45fd8ebee8e733 (diff)
Sun Mar 4 00:01:47 UTC 2012
Diffstat (limited to 'community/radvd/radvd.rc')
-rw-r--r--community/radvd/radvd.rc34
1 files changed, 34 insertions, 0 deletions
diff --git a/community/radvd/radvd.rc b/community/radvd/radvd.rc
new file mode 100644
index 000000000..b5dc6e27b
--- /dev/null
+++ b/community/radvd/radvd.rc
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/${0##*/}
+
+NAME='IPv6 Router Advertisement Daemon'
+DAEMON=/usr/sbin/radvd
+PID=$(pidof -o %PPID $DAEMON)
+
+case "$1" in
+ start)
+ stat_busy "Starting $NAME daemon"
+ [[ ! $PID ]] && $DAEMON $DAEMON_OPTS && add_daemon $NAME && stat_done && exit 0
+ stat_fail
+ ;;
+ stop)
+ stat_busy "Stopping $NAME daemon"
+ [[ $PID ]] && kill $PID &> /dev/null && rm_daemon $NAME && stat_done && exit 0
+ stat_fail
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ exit 0
+ ;;
+ *)
+ echo "usage: ${0##*/} {start|stop|restart}" >&2
+ ;;
+esac
+
+exit 1
+
+# vim:set ts=2 sw=2 ft=sh noet: