aboutsummaryrefslogtreecommitdiffstats
path: root/community/knot-resolver/kresd.initd
blob: 6f3db68264a14b6e35ec2a3417d0578ae8075d0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/sbin/openrc-run

: ${cfgfile:=${config:-"/etc/knot-resolver/kresd.conf"}}
: ${cachedir:="/var/cache/knot-resolver"}
: ${logfile:="/var/log/knot-resolver.log"}

command="/usr/sbin/kresd"
command_args="--noninteractive --config=$cfgfile $cachedir"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
start_stop_daemon_args="
	--chdir=$cachedir
	--stdout=$logfile
	--stderr=$logfile"
required_files="$cfgfile"

depend() {
	need net
	before kres-cache-gc
}

start_pre() {
	checkpath -d -m 750 -o kresd:kresd "$cachedir"
}