From d7f8dd800b5acffcce0584a23b67821f9a4c16c1 Mon Sep 17 00:00:00 2001 From: binhex Date: Sat, 10 Nov 2018 20:05:15 +0000 Subject: [PATCH] silence curl, allow auth localhost --- run/nobody/qbittorrent.sh | 4 ++-- run/nobody/watchdog.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/run/nobody/qbittorrent.sh b/run/nobody/qbittorrent.sh index 1934fd4..9e450b5 100644 --- a/run/nobody/qbittorrent.sh +++ b/run/nobody/qbittorrent.sh @@ -6,7 +6,7 @@ if [[ "${qbittorrent_running}" == "true" ]]; then if [[ "${VPN_PROV}" == "pia" && -n "${VPN_INCOMING_PORT}" ]]; then - curl -i -X POST -d "json=%7B%22listen_port%22%3A${VPN_INCOMING_PORT}%7D" "http://localhost:${WEBUI_PORT}/command/setPreferences" + curl -i -X POST -d "json=%7B%22listen_port%22%3A${VPN_INCOMING_PORT}%7D" "http://localhost:${WEBUI_PORT}/command/setPreferences" &> /dev/null fi @@ -61,7 +61,7 @@ else # option 'Bypass authentication for clients on localhost' if [[ "${VPN_PROV}" == "pia" && -n "${VPN_INCOMING_PORT}" ]]; then - curl -i -X POST -d "json=%7B%22listen_port%22%3A${VPN_INCOMING_PORT}%7D" "http://localhost:${WEBUI_PORT}/command/setPreferences" + curl -i -X POST -d "json=%7B%22listen_port%22%3A${VPN_INCOMING_PORT}%7D" "http://localhost:${WEBUI_PORT}/command/setPreferences" &> /dev/null fi diff --git a/run/nobody/watchdog.sh b/run/nobody/watchdog.sh index d0b8df4..e336e5c 100644 --- a/run/nobody/watchdog.sh +++ b/run/nobody/watchdog.sh @@ -38,7 +38,7 @@ while true; do if [[ "${VPN_ENABLED}" == "yes" ]]; then # forcibly set allow anonymous access from localhost to api (used to change incoming port) - sed -i "s~^WebUI\LocalHostAuth=.*~WebUI\LocalHostAuth=true~g" "${qbittorrent_config}" + sed -i "s~^WebUI\LocalHostAuth=.*~WebUI\LocalHostAuth=false~g" "${qbittorrent_config}" # forcibly set random incoming port to false sed -i "s~^General\UseRandomPort=.*~General\UseRandomPort=false~g" "${qbittorrent_config}"