Properly handle multiple plugins when starting the proxy.

This commit is contained in:
Frank Denis
2012-09-19 22:15:52 +02:00
parent d1f8cb7d47
commit 690ccf46b0
@@ -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