From 690ccf46b06c1263760867f8eff3c1d71082c661 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 19 Sep 2012 22:15:52 +0200 Subject: [PATCH] Properly handle multiple plugins when starting the proxy. --- .../DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh index 3d08bf0..6446e23 100755 --- a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh +++ b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh @@ -116,7 +116,7 @@ for plugin in $DNSCRYPT_PROXY_PLUGINS; do done best_args=$(cat "${RES_DIR}/${best_file}") -dnscrypt-proxy $best_args --local-address="${INTERFACE_PROXY}" \ +eval dnscrypt-proxy $best_args --local-address="$INTERFACE_PROXY" \ --pidfile="$PROXY_PID_FILE" --user=daemon --daemonize $plugin_args if [ $? != 0 ]; then @@ -127,8 +127,9 @@ if [ $? != 0 ]; then rm -f "$PROXY_PID_FILE" killall -9 dnscrypt-proxy sleep 1 - dnscrypt-proxy $best_args --local-address="${INTERFACE_PROXY}" \ - --pidfile="$PROXY_PID_FILE" --user=daemon --daemonize || exit 1 + eval dnscrypt-proxy $best_args --local-address="$INTERFACE_PROXY" \ + --pidfile="$PROXY_PID_FILE" --user=daemon --daemonize $plugin_args || \ + exit 1 fi i=0