From 73e5eb1a52eb7b0bfe192c3f0d59a58b43fc4731 Mon Sep 17 00:00:00 2001 From: IT Offshore Date: Sun, 10 Nov 2013 09:58:57 +0000 Subject: testing/dnscrypt-proxy: upgrade to to 1.33 Complete patch to bump dnscrypt-proxy to version 1.33 Minor changes to APKBUILD to build with the new sources & make-depends. confd / initd changed to include the additional configurations to set the alternative resolver ip / public keys. Separate patch created to build dnscrypt's dependency libsodium / libsodium-dev (as it no longer forms part of dnscrypt's sources). Post-install script is just status / info using the $STRONG / $RED / $GREEN system colours. Added /sbin/setup-dnscrypt for changing the resolver dnscrypt queries & optionally installing unbound for dns caching. This also uses the system terminal colours. This no longer makes any changes to init.d, it only updates conf.d --- testing/dnscrypt-proxy/dnscrypt-proxy.initd | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'testing/dnscrypt-proxy/dnscrypt-proxy.initd') diff --git a/testing/dnscrypt-proxy/dnscrypt-proxy.initd b/testing/dnscrypt-proxy/dnscrypt-proxy.initd index ff63b6f418..b09763744c 100644 --- a/testing/dnscrypt-proxy/dnscrypt-proxy.initd +++ b/testing/dnscrypt-proxy/dnscrypt-proxy.initd @@ -1,19 +1,24 @@ #!/sbin/runscript +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 + after logger firewall } -start() { - ebegin "Starting dnscrypt-proxy" - start-stop-daemon --start --quiet --pidfile=${PID} --exec /usr/sbin/dnscrypt-proxy -- -p ${PID} -l ${DNSCRYPT_LOGFILE} -d -u ${DNSCRYPT_GROUP} -a ${DNSCRYPT_LOCALIP} - eend $? +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 } -stop() { - ebegin "Stopping dnscrypt-proxy" - start-stop-daemon --stop --quiet --exec /usr/sbin/dnscrypt-proxy - eend $? -} -- cgit v1.2.3