#!/bin/bash PIDFILE=/var/run/radvd.pid RADVD_CONFIG=/etc/radvd.conf . /etc/rc.conf . /etc/rc.d/functions case "$1" in start) stat_busy "Starting radvd Daemon" /usr/sbin/radvd --config $RADVD_CONFIG --pidfile $PIDFILE if [ $? -gt 0 ]; then stat_fail else stat_done fi ;; stop) stat_busy "Stopping radvd Daemon" kill $(cat $PIDFILE) &>/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