mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 12:15:32 +03:00
24 lines
525 B
Text
24 lines
525 B
Text
#!/sbin/openrc-run
|
|
|
|
: ${config:="/etc/knot-resolver/kresd.conf"}
|
|
: ${cachedir:="/var/cache/knot-resolver"}
|
|
: ${logfile:="/var/log/knot-resolver.log"}
|
|
|
|
command="/usr/sbin/kresd"
|
|
# Note: Do not change forks=1, it's buggy.
|
|
command_args="--config=$config --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"
|
|
}
|