You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd-r1

21 lines
667 B

#!/sbin/openrc-run
# Copyright 1999-2019 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"
start_stop_daemon_args="--background --make-pidfile"
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}"
}