diff options
Diffstat (limited to 'meta/recipes-connectivity/kea/files/kea-dhcp6-server')
-rw-r--r-- | meta/recipes-connectivity/kea/files/kea-dhcp6-server | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp6-server b/meta/recipes-connectivity/kea/files/kea-dhcp6-server new file mode 100644 index 0000000000..10f2d22641 --- /dev/null +++ b/meta/recipes-connectivity/kea/files/kea-dhcp6-server | |||
@@ -0,0 +1,47 @@ | |||
1 | #!/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 | ||
12 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
13 | DESC="kea-dhcp6-server" | ||
14 | NAME=kea-dhcp6 | ||
15 | DAEMON=/usr/sbin/keactrl | ||
16 | DAEMON_ARGS=" -s dhcp6" | ||
17 | |||
18 | set -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 | |||
26 | case "$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 | ;; | ||
47 | esac | ||