From 8b343dbc19010282be6eb3eb3387013f9788de2f Mon Sep 17 00:00:00 2001 From: binhex Date: Sun, 5 Jan 2020 19:51:59 +0000 Subject: [PATCH] fix incoming port assignment --- run/nobody/qbittorrent.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run/nobody/qbittorrent.sh b/run/nobody/qbittorrent.sh index 3f09b5c..fd3c08f 100644 --- a/run/nobody/qbittorrent.sh +++ b/run/nobody/qbittorrent.sh @@ -56,8 +56,8 @@ fi # option 'Bypass authentication for clients on localhost' if [[ "${VPN_PROV}" == "pia" && -n "${VPN_INCOMING_PORT}" ]]; then - curl -i -X POST -d "json=%7B%22random_port%22%3Afalse%7D" "http://localhost:${WEBUI_PORT}/command/setPreferences" &> /dev/null - curl -i -X POST -d "json=%7B%22listen_port%22%3A${VPN_INCOMING_PORT}%7D" "http://localhost:${WEBUI_PORT}/command/setPreferences" &> /dev/null + curl -i -X POST -d "json={\"random_port\": false}" "http://localhost:2100/api/v2/app/setPreferences" &> /dev/null + curl -i -X POST -d "json={\"listen_port\": ${VPN_INCOMING_PORT}}" "http://localhost:2100/api/v2/app/setPreferences" &> /dev/null # set qbittorrent port to current vpn port (used when checking for changes on next run)s qbittorrent_port="${VPN_INCOMING_PORT}"