diff options
Diffstat (limited to 'testing/knot-resolver/knot-resolver.initd')
-rw-r--r-- | testing/knot-resolver/knot-resolver.initd | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/knot-resolver/knot-resolver.initd b/testing/knot-resolver/knot-resolver.initd new file mode 100644 index 0000000000..7a4ef61eaf --- /dev/null +++ b/testing/knot-resolver/knot-resolver.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run + +: ${config:="/etc/knot-resolver/config"} +: ${cachedir:="/var/cache/knot-resolver"} +: ${keyfile:="/var/lib/knot-resolver/root.keys"} +: ${logfile:="/var/log/knot-resolver.log"} + +command="/usr/sbin/kresd" +# Note: Do not change forks=1, it's buggy. +command_args="--config=$config --keyfile=$keyfile --forks=1 $cachedir" +command_background="yes" +pidfile="/run/$RC_SVCNAME.pid" +start_stop_daemon_args=" + --chdir=$cachedir + --stdout=$logfile + --stderr=$logfile" +required_files="$config" + +depend() { + need net +} + +start_pre() { + checkpath -d -m 750 -o kresd:kresd "$cachedir" +} |