gentoo-ebuilds/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd
Brian Evans 34d0fd905f
net-dns/dnscrypt-proxy: Update OpenRC script
Non-maintainer commit: This is effectively the same options reorganized
for future consideration.

Closes: https://bugs.gentoo.org/828076
Signed-off-by: Brian Evans <grknight@gentoo.org>
2021-12-03 09:41:13 -05:00

20 lines
639 B
Text

#!/sbin/openrc-run
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
command="/usr/bin/dnscrypt-proxy"
command_args="${DNSCRYPT_PROXY_OPTS:--config /etc/dnscrypt-proxy/dnscrypt-proxy.toml}"
command_user="${DNSCRYPT_PROXY_USER:-dnscrypt-proxy}:${DNSCRYPT_PROXY_GROUP:-dnscrypt-proxy}"
pidfile="/run/${RC_SVCNAME}.pid"
retry="SIGTERM/5/SIGTERM/5/SIGKILL/5"
command_background="yes"
depend() {
use logger net
provide dns
}
start_pre() {
checkpath -q -d -m 0775 -o "${command_user}" /var/cache/"${RC_SVCNAME}"
checkpath -q -d -m 0775 -o "${command_user}" /var/log/"${RC_SVCNAME}"
}