From 73ca3e136fc69f4246e9bd3038122be3879e9c1c Mon Sep 17 00:00:00 2001 From: Alter Step Date: Mon, 2 Jun 2014 22:21:20 -0700 Subject: [PATCH] If something is wrong with the proxy, disable it before restarting it --- .../extra/usr/scripts/switch-to-dnscrypt-if-required.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/switch-to-dnscrypt-if-required.sh b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/switch-to-dnscrypt-if-required.sh index 6afe822..4196aea 100755 --- a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/switch-to-dnscrypt-if-required.sh +++ b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/switch-to-dnscrypt-if-required.sh @@ -17,8 +17,8 @@ while [ -e "$DNSCRYPT_FILE" ]; do current_resolvers=$(./get-current-resolvers.sh) if [ "$current_resolvers" = "$INTERFACE_PROXY" ]; then if [ ! -e "$PROXY_PID_FILE" ]; then - logger_debug "The proxy should be running but it isn't. Launching it." - ./start-dnscrypt-proxy.sh || ./switch-to-dhcp.sh + logger_debug "The proxy should be running but it isn't." + ./switch-to-dhcp.sh fi fi if [ $pause -lt $PAUSE_MAX ]; then @@ -32,6 +32,7 @@ while [ -e "$DNSCRYPT_FILE" ]; do logger_debug "The router hijacks HTTP queries - DNSCrypt is likely to be blocked" continue fi + ./start-dnscrypt-proxy.sh ./check-local-dns.sh || continue ./set-dns.sh "$INTERFACE_PROXY" if [ $? != 0 ]; then