aboutsummaryrefslogtreecommitdiffstats
path: root/community/knot-resolver/kresd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'community/knot-resolver/kresd.initd')
-rw-r--r--community/knot-resolver/kresd.initd18
1 files changed, 16 insertions, 2 deletions
diff --git a/community/knot-resolver/kresd.initd b/community/knot-resolver/kresd.initd
index 1ef4b19560f..494eb066a3e 100644
--- a/community/knot-resolver/kresd.initd
+++ b/community/knot-resolver/kresd.initd
@@ -3,19 +3,33 @@
: ${command_user:="kresd:kresd"}
: ${cfgfile:=${config:-"/etc/knot-resolver/kresd.conf"}}
: ${cachedir:="/var/cache/knot-resolver"}
-: ${output_logger="logger -t kresd -p daemon.info"}
+: ${output_logger="logger -t kresd -p daemon.info >/dev/null 2>&1"}
+: ${error_logger="logger -t kresd -p daemon.err >/dev/null 2>&1"}
: ${wait:=100}
command="/usr/sbin/kresd"
command_args="--noninteractive --config=$cfgfile $cachedir"
command_background="yes"
+
pidfile="/run/$RC_SVCNAME.pid"
-start_stop_daemon_args="--chdir=$cachedir --wait $wait"
+directory="$cachedir"
+start_stop_daemon_args="--wait $wait"
+# The leading space is to avoid fallback to $start_stop_daemon_args when this
+# is empty (supervise-daemon doesn't support --wait).
+supervise_daemon_args=" $supervise_daemon_args"
+
required_files="$cfgfile"
+# cap_net_bind_service - required to bind to well-known ports
+# cap_setpcap - when available, resd drops any extra privileges after the
+# daemon successfully start
+# (This is supported since OpenRC 0.45)
+capabilities="^cap_net_bind_service,^cap_setpcap"
+
depend() {
need net
before kres-cache-gc
+ provide dns
}
start_pre() {