mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-02 04:11:33 +02:00
36 lines
765 B
Plaintext
36 lines
765 B
Plaintext
#!/sbin/runscript
|
|
# Copyright 1999-2013 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: /var/cvsroot/gentoo-x86/net-dns/knot/files/knot.init,v 1.2 2013/08/21 09:23:59 scarabeus Exp $
|
|
|
|
depend() {
|
|
need net
|
|
}
|
|
|
|
start() {
|
|
checkpath -d -m 0750 -o knot:knot /var/run/knot/ /var/lib/knot/
|
|
|
|
ebegin "Starting knot"
|
|
start-stop-daemon --start \
|
|
--pidfile $pidfile --exec $command -- $command_args
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping knot"
|
|
/usr/sbin/knotc stop >/dev/null 2>&1
|
|
# In case remote control is not working
|
|
if [ "$?" != 0 ]; then
|
|
if [ -f $pidfile ]; then
|
|
start-stop-daemon --stop --pidfile $pidfile
|
|
fi
|
|
fi
|
|
ewend $?
|
|
}
|
|
|
|
reload() {
|
|
ebegin "Reloading knot"
|
|
/usr/sbin/knotc reload >/dev/null
|
|
eend $?
|
|
}
|