1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 12:15:32 +03:00
aports/community/knot-resolver/kres-cache-gc.initd
Jakub Jirutka a2ca4f04ab community/knot-resolver: rename service knot-resolver to kresd
For consistency with upstream.
2020-02-23 14:08:49 +01:00

22 lines
589 B
Text

#!/sbin/openrc-run
description="Knot Resolver Cache Garbage Collector"
: ${command_user:="kresd"}
: ${garbage_interval:=1000}
: ${output_logger="logger -t kres-cache-gc -p daemon.info"}
: ${wait:=50} # milliseconds
command="/usr/sbin/kres-cache-gc"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
start_stop_daemon_args="--wait $wait"
start_pre() {
if [ -z "$cachedir" ] && [ -e /etc/conf.d/kresd ]; then
cachedir=$(. /etc/conf.d/kresd; echo "$cachedir")
fi
: ${cachedir:="/var/cache/knot-resolver"}
command_args="-c $cachedir -d $garbage_interval ${command_args:-}"
}