diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/radvd/radvd.rc.d |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/radvd/radvd.rc.d')
-rw-r--r-- | community/radvd/radvd.rc.d | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/community/radvd/radvd.rc.d b/community/radvd/radvd.rc.d new file mode 100644 index 000000000..f8c9ea571 --- /dev/null +++ b/community/radvd/radvd.rc.d @@ -0,0 +1,38 @@ +#!/bin/bash + +### /etc/rc.d/radvd: Initscript for radvd Daemon + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/radvd` +case "$1" in + start) + stat_busy "Starting radvd Daemon" + [ -z "$PID" ] && \ + /usr/sbin/radvd &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else stat_done; add_daemon radvd + echo $PID > /var/run/radvd.pid + fi ;; + stop) + stat_busy "Stopping radvd Daemon" + [ ! -z "$PID" ] \ + && kill $PID &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + stat_done; rm_daemon radvd + fi ;; + restart) + $0 stop + sleep 1 + $0 start ;; + *) + echo "usage: $0 {start|stop|restart}" +esac + +exit 0 + +### /etc/rc.d/radvd: Initscript for radvd Daemon |