mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-20 08:26:49 +02:00
Knot DNS 3.2.5 changed socket permissions to allow any user to communicate with the DNS server. For this to be usable, any user must be able to access a socket in the runtime directory. Search permission should be sufficient for this purpose, as anything trying to connect to a socket should already know the path it is looking for.
37 lines
921 B
Bash
37 lines
921 B
Bash
#!/sbin/openrc-run
|
|
# 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 $
|
|
|
|
name="knotd"
|
|
command="/usr/sbin/knotd"
|
|
command_args="-d ${KNOTD_OPTS}"
|
|
start_stop_daemon_args="--wait 5"
|
|
required_files=/etc/knot/knot.conf
|
|
extra_started_commands="reload"
|
|
description_reload="Reload configuration and changed zones"
|
|
|
|
depend() {
|
|
need net
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -d -m 0751 -o knot:knot /run/knot/
|
|
checkpath -d -m 0750 -o knot:knot /var/lib/knot/
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping $name"
|
|
/usr/sbin/knotc stop >/dev/null 2>&1
|
|
# Mark service as stopped if remote control was successful
|
|
if [ $? -eq 0 ]; then
|
|
start-stop-daemon --stop --quiet --pidfile /run/knot/knot.pid
|
|
fi
|
|
eend $?
|
|
}
|
|
|
|
reload() {
|
|
ebegin "Reloading $name"
|
|
/usr/sbin/knotc reload >/dev/null
|
|
eend $?
|
|
}
|