diff options
author | root <root@rshg054.dnsready.net> | 2012-03-15 00:01:19 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-03-15 00:01:19 +0000 |
commit | 14635ca5380a480450a66c3fcc29992d29a2bd8e (patch) | |
tree | a2f8e712c9e15b829397666c06d1cdd1a877d8a6 /community/radvd/radvd.rc | |
parent | 01a0c4bc740842efa3bf1a7e1d6c8be5656e4e2a (diff) |
Thu Mar 15 00:01:19 UTC 2012
Diffstat (limited to 'community/radvd/radvd.rc')
-rw-r--r-- | community/radvd/radvd.rc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/community/radvd/radvd.rc b/community/radvd/radvd.rc index b5dc6e27b..fdd9ee8ce 100644 --- a/community/radvd/radvd.rc +++ b/community/radvd/radvd.rc @@ -6,12 +6,15 @@ NAME='IPv6 Router Advertisement Daemon' DAEMON=/usr/sbin/radvd -PID=$(pidof -o %PPID $DAEMON) +PIDFILE=${PIDFILE:-/run/${0##*/}.pid} +DAEMON_OPTS+=("--pidfile=$PIDFILE") +[[ -r "$PIDFILE" ]] && read PID < "$PIDFILE" case "$1" in start) stat_busy "Starting $NAME daemon" - [[ ! $PID ]] && $DAEMON $DAEMON_OPTS && add_daemon $NAME && stat_done && exit 0 + [[ ! $PID ]] && $DAEMON "${DAEMON_OPTS[@]}" && + add_daemon $NAME && stat_done && exit 0 stat_fail ;; stop) |