1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 11:45:18 +03:00
aports/testing/knot-resolver/knot-resolver.initd
Jakub Jirutka a75feeec37 testing/knot-resolver: new aport
https://www.knot-resolver.cz/
A minimalistic caching resolver implementation
2016-10-02 20:57:44 +02:00

25 lines
589 B
Text

#!/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"
}