Skip to content

Commit

Permalink
just one call
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhotio committed Jan 27, 2024
1 parent c189ba4 commit 630d8c0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions root/app/forwarded_port_update_app
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ if grep -q 'WebUI\\HTTPS\\Enabled=true' "${CONFIG_DIR}/config/qBittorrent.conf";
webui_https="https"
fi
if grep -q 'WebUI\\LocalHostAuth=false' "${CONFIG_DIR}/config/qBittorrent.conf"; then
curl -fsSL --insecure -X POST -d "json={\"upnp\": false}" "${webui_https}://localhost:${WEBUI_PORTS%%/*}/api/v2/app/setPreferences"
curl -fsSL --insecure -X POST -d "json={\"random_port\": false}" "${webui_https}://localhost:${WEBUI_PORTS%%/*}/api/v2/app/setPreferences"
curl -fsSL --insecure -X POST -d "json={\"listen_port\": ${port}}" "${webui_https}://localhost:${WEBUI_PORTS%%/*}/api/v2/app/setPreferences"
curl -fsSL --insecure -X POST -d "json={\"web_ui_upnp\":false,\"upnp\":false,\"random_port\":false,\"listen_port\":${port}}" "${webui_https}://localhost:${WEBUI_PORTS%%/*}/api/v2/app/setPreferences"
else
echo "[WARNING] [$(date '+%Y-%m-%d %H:%M:%S')] Unable to set forwarded port in qBittorrent, \"LocalHostAuth\" is enabled!"
fi

0 comments on commit 630d8c0

Please sign in to comment.