diff --git a/run/nobody/qbittorrent.sh b/run/nobody/qbittorrent.sh index 702fbf7..162be47 100644 --- a/run/nobody/qbittorrent.sh +++ b/run/nobody/qbittorrent.sh @@ -8,6 +8,10 @@ if [[ "${qbittorrent_running}" == "true" ]]; 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 + + # set qbittorrent port to current vpn port (used when checking for changes on next run) + qbittorrent_port="${VPN_INCOMING_PORT}" + fi @@ -65,6 +69,12 @@ else 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 + # set rtorrent port to current vpn port (used when checking for changes on next run) + qbittorrent_port="${VPN_INCOMING_PORT}" + fi fi + +# set qbittorrent ip to current vpn ip (used when checking for changes on next run) +qbittorrent_ip="${vpn_ip}" diff --git a/run/nobody/watchdog.sh b/run/nobody/watchdog.sh index a342c93..867f55a 100644 --- a/run/nobody/watchdog.sh +++ b/run/nobody/watchdog.sh @@ -49,7 +49,7 @@ while true; do # if current bind interface ip is different to tunnel local ip then re-configure qbittorrent if [[ "${qbittorrent_ip}" != "${vpn_ip}" ]]; then - echo "[info] qBittorrent listening interface IP $qbittorrent_ip and VPN provider IP ${vpn_ip} different, marking for reconfigure" + echo "[info] qBittorrent listening interface IP ${qbittorrent_ip} and VPN provider IP ${vpn_ip} different, marking for reconfigure" # mark as reload required due to mismatch ip_change="true"