blob: 50fe40d43910eb2da0882f5d73d003af979946b0 [file] [log] [blame]
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001#!/bin/sh
2### BEGIN INIT INFO
3# Provides: kea-dhcp-ddns-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
11PATH=/sbin:/usr/sbin:/bin:/usr/bin
12DESC="kea-dhcp-ddns-server"
13NAME=kea-dhcp-ddns
14DAEMON=/usr/sbin/keactrl
15DAEMON_ARGS=" -s dhcp_ddns"
16
17set -e
18
19# Exit if the package is not installed
20[ -x "$DAEMON" ] || exit 0
21
22# Source function library.
23. /etc/init.d/functions
24
25case "$1" in
26 start)
27 echo -n "Starting $DESC: "
28 start-stop-daemon -S -b -n $NAME -x $DAEMON -- start $DAEMON_ARGS
29 echo "done."
30 ;;
31 stop)
32 echo -n "Stopping $DESC: "
33 kpid=`pidof $NAME`
34 kill $kpid
35 echo "done."
36 ;;
37 restart|force-reload)
38 #
39 $0 stop
40 $0 start
41 ;;
42 *)
43 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
44 exit 1
45 ;;
46esac