From 2b6cf8bdb121296a7bef7c7d05e458ce16b1401f Mon Sep 17 00:00:00 2001 From: Francesco Colista Date: Wed, 11 Apr 2018 13:06:54 +0000 Subject: community/dnscrypt-proxy: fixed initd for new version --- community/dnscrypt-proxy/dnscrypt-proxy.initd | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'community/dnscrypt-proxy/dnscrypt-proxy.initd') diff --git a/community/dnscrypt-proxy/dnscrypt-proxy.initd b/community/dnscrypt-proxy/dnscrypt-proxy.initd index f68da6da72..e24085f127 100644 --- a/community/dnscrypt-proxy/dnscrypt-proxy.initd +++ b/community/dnscrypt-proxy/dnscrypt-proxy.initd @@ -1,24 +1,19 @@ #!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 -pidfile=/var/run/dnscrypt-proxy/dnscrypt-proxy.pid -command=/usr/bin/dnscrypt-proxy -command_args="--pidfile=$pidfile --daemonize - --logfile=${DNSCRYPT_LOGFILE:-/var/log/dnscrypt-proxy/dnscrypt-proxy.log} - --user=${DNSCRYPT_USER:-dnscrypt} - --local-address=${DNSCRYPT_LOCALIP:-127.0.0.1:53}" - +command="/usr/bin/dnscrypt-proxy" +command_args="${DNSCRYPT_OPTS:---config /etc/dnscrypt-proxy/dnscrypt-proxy.toml}" +command_user="${DNSCRYPT_USER:-dnscrypt}:${DNSCRYPT_GROUP:-dnscrypt}" +pidfile="/run/dnscrypt-proxy/${SVCNAME}.pid" +start_stop_daemon_args="--background --make-pidfile" depend() { - use net - before dns - after logger firewall + use net logger + provide dns } start_pre() { - checkpath --directory ${pidfile%/*} - # by default opendns is used but its possible to override - if [ -n "$RESOLVER" ] && [ -n "$PUBKEY" ] && [ -n "$PROVIDER" ]; then - command_args="$command_args -r ${RESOLVER} -k ${PUBKEY} -N ${PROVIDER}" - fi + checkpath -q -d -m 0775 -o "${command_user}" /var/cache/"${SVCNAME}" + checkpath -q -d -m 0775 -o "${command_user}" /var/log/"${SVCNAME}" } - -- cgit v1.2.3