blob: 10f2d226412f52e6087441155fa014aec367aad6 [file] [log] [blame]
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001#!/bin/sh
2### BEGIN INIT INFO
3# Provides: kea-dhcp6-server
4# Required-Start: $local_fs $network $remote_fs $syslog
5# Required-Stop: $local_fs $network $remote_fs $syslog
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: ISC KEA DHCP IPv6 Server
9### END INIT INFO
10
11# PATH should only include /usr/* if it runs after the mountnfs.sh script
12PATH=/sbin:/usr/sbin:/bin:/usr/bin
13DESC="kea-dhcp6-server"
14NAME=kea-dhcp6
15DAEMON=/usr/sbin/keactrl
16DAEMON_ARGS=" -s dhcp6"
17
18set -e
19
20# Exit if the package is not installed
21[ -x "$DAEMON" ] || exit 0
22
23# Source function library.
24. /etc/init.d/functions
25
26case "$1" in
27 start)
28 echo -n "Starting $DESC: "
29 start-stop-daemon -S -b -n $NAME -x $DAEMON -- start $DAEMON_ARGS
30 echo "done."
31 ;;
32 stop)
33 echo -n "Stopping $DESC: "
34 kpid=`pidof $NAME`
35 kill $kpid
36 echo "done."
37 ;;
38 restart|force-reload)
39 #
40 $0 stop
41 $0 start
42 ;;
43 *)
44 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
45 exit 1
46 ;;
47esac