silence curl, allow auth localhost

pull/7/head 4.1.3-2-01
binhex 6 years ago
parent 391f1a2346
commit d7f8dd800b

@ -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

@ -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}"

Loading…
Cancel
Save