aboutsummaryrefslogtreecommitdiffstats
path: root/community/dnscrypt-proxy/dnscrypt-proxy.initd
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 12:07:35 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 12:07:35 +0000
commited882187b3b2b9115fadd7bcf80eee1fe2036fca (patch)
tree468cc25c9fb720e5ae1dabb177121b03b9426da2 /community/dnscrypt-proxy/dnscrypt-proxy.initd
parent9915aa672f809ab75f1bf0c8091938bddf6fad5c (diff)
downloadaports-ed882187b3b2b9115fadd7bcf80eee1fe2036fca.tar.bz2
aports-ed882187b3b2b9115fadd7bcf80eee1fe2036fca.tar.xz
community/dnscrypt-proxy: moved from testing
Diffstat (limited to 'community/dnscrypt-proxy/dnscrypt-proxy.initd')
-rw-r--r--community/dnscrypt-proxy/dnscrypt-proxy.initd24
1 files changed, 24 insertions, 0 deletions
diff --git a/community/dnscrypt-proxy/dnscrypt-proxy.initd b/community/dnscrypt-proxy/dnscrypt-proxy.initd
new file mode 100644
index 0000000000..8c3246b6c6
--- /dev/null
+++ b/community/dnscrypt-proxy/dnscrypt-proxy.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+
+pidfile=/var/run/dnscrypt-proxy/dnscrypt-proxy.pid
+command=/usr/sbin/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}"
+
+
+depend() {
+ use net
+ before dns
+ after logger firewall
+}
+
+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
+}
+