4
# Required-Start: $syslog $network $remote_fs
5
# Required-Stop: $syslog $remote_fs
6
# Should-Start: $local_fs
7
# Should-Stop: $local_fs
8
# Default-Start: 2 3 4 5
10
# Short-Description: Start/Stop dhcpy6d DHCPv6 server
11
# Description: (empty)
16
PATH=/sbin:/bin:/usr/sbin:/usr/bin
17
DHCPY6DBIN=/usr/sbin/dhcpy6d
18
DHCPY6DCONF=/etc/dhcpy6d.conf
19
DHCPY6DPID=/var/run/dhcpy6d.pid
21
DESC="dhcpy6d DHCPv6 server"
26
DEFAULTFILE=/etc/default/dhcpy6d
27
if [ -f $DEFAULTFILE ]; then
31
. /lib/lsb/init-functions
35
if [ ! -r "$DHCPY6DPID" ]; then
36
test "$1" != -v || echo "$NAME is not running."
39
if read pid < "$DHCPY6DPID" && ps -p "$pid" > /dev/null 2>&1; then
40
test "$1" != -v || echo "$NAME is running."
43
test "$1" != -v || echo "$NAME is not running but $DHCPY6DPID exists."
48
test -x $DHCPY6DBIN || exit 0
52
if [ "$RUN" = "no" ]; then
53
echo "dhcpy6d is disabled in /etc/default/dhcpy6d. Set RUN=yes to get it running."
57
log_daemon_msg "Starting $DESC $NAME"
59
if ! check_status; then
61
start-stop-daemon --start --make-pidfile --pidfile ${DHCPY6DPID} \
62
--background --oknodo --no-close --exec $DHCPY6DBIN -- --config $DHCPY6DCONF \
69
if check_status -q; then
81
log_daemon_msg "Stopping $DESC $NAME"
82
start-stop-daemon --stop --quiet --pidfile ${DHCPY6DPID} --oknodo
90
if [ "$?" != "0" ]; then
95
echo "Status of $NAME: "
100
echo "Usage: $0 (start|stop|restart|force-reload|status)"