Skip to content

Commit

Permalink
force curl retry and add delay
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhotio committed Feb 3, 2024
1 parent 03bebfa commit 20a96b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion root/app/forwarded_port_update_app
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +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
if ! curl -fsSL --retry 5 --retry-max-time 60 --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"; then
if ! curl -fsSL --retry-all-errors --retry-delay 10 --retry 5 --retry-max-time 120 --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"; then
echo "[ERROR] [$(date '+%Y-%m-%d %H:%M:%S')] [QBITTORRENT] Unable to set forwarded port, something is wrong!"
rm -rf "${CONFIG_DIR}/wireguard/forwarded_port"
exit 1
Expand Down

0 comments on commit 20a96b6

Please sign in to comment.