It's fine if dnscrypt-proxy exit in any order (TCP first)

Quit if start-dnscrypt-proxy fails. It cannot fail because there was
already a running dnscrypt-proxy because if would be killed.
This commit is contained in:
Alter Step
2015-08-24 00:24:16 +02:00
parent 4dea9c3ef7
commit 579d08a422
2 changed files with 6 additions and 2 deletions
@@ -85,9 +85,13 @@ try_resolver 5005 "${RESOLVER_NAME} using DNSCrypt over TCP" \
wait_pids="$wait_pids $!"
for pid in $wait_pids; do
wait $pid
wait
best_file=$(ls "$RES_DIR" | head -n 1)
[ x"$best_file" != "x" ] && break
if [ ! -e "$DNSCRYPT_FILE" ]; then
logger_debug "Aborted by user"
exit 1
fi
done
if [ x"$best_file" = "x" ]; then
@@ -38,7 +38,7 @@ while [ -e "$DNSCRYPT_FILE" ]; do
continue
fi
fi
./start-dnscrypt-proxy.sh
./start-dnscrypt-proxy.sh || continue
./check-local-dns.sh || continue
./set-dns.sh "$INTERFACE_PROXY"
if [ $? != 0 ]; then