diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2018-04-11 13:06:54 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2018-04-11 13:06:54 +0000 |
commit | 2b6cf8bdb121296a7bef7c7d05e458ce16b1401f (patch) | |
tree | 6b34374ed2aba931deec17debddf2ceaa5c41525 /community/dnscrypt-proxy/dnscrypt-proxy.initd | |
parent | 9bcc3109caf436c3dbcf5eadd61f8a68b6308961 (diff) | |
download | aports-2b6cf8bdb121296a7bef7c7d05e458ce16b1401f.tar.bz2 aports-2b6cf8bdb121296a7bef7c7d05e458ce16b1401f.tar.xz |
community/dnscrypt-proxy: fixed initd for new version
Diffstat (limited to 'community/dnscrypt-proxy/dnscrypt-proxy.initd')
-rw-r--r-- | community/dnscrypt-proxy/dnscrypt-proxy.initd | 27 |
1 files changed, 11 insertions, 16 deletions
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}" } - |