From a230b28ffda1f788aeec6040c1f0f12bf03d5c98 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 24 Nov 2025 09:22:28 +0100 Subject: [PATCH] Update run --- .../etc/s6-overlay/s6-rc.d/svc-qbittorrent/run | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/qbittorrent/rootfs/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run b/qbittorrent/rootfs/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run index d0ff84b50..def523aa9 100644 --- a/qbittorrent/rootfs/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run +++ b/qbittorrent/rootfs/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run @@ -79,6 +79,11 @@ _vpn_monitor_public_ip() { return 0 fi + if [[ ! -s "${current_ip_file}" ]]; then + bashio::log.warning "${vpn_label}: public ip could not be reached; VPN leak monitoring disabled." + return 0 + fi + if ! bashio::fs.file_exists "${current_ip_file}"; then bashio::log.warning "${vpn_label}: baseline IP file ${current_ip_file} not found; VPN leak monitoring disabled." return 0 @@ -231,11 +236,7 @@ echo "$(_fetch_public_ip || true)" > /currentip if bashio::config.true 'openvpn_enabled'; then # Start Leak Monitor - if [[ ! -s /currentip ]]; then - bashio::log.warning "Could not fetch public ip, the vpn leakage service will not run" - else - _vpn_monitor_public_ip "OpenVPN" & - fi + _vpn_monitor_public_ip "OpenVPN" & exec /usr/sbin/openvpn \ --config /config/openvpn/config.ovpn \ @@ -255,11 +256,7 @@ elif bashio::config.true 'wireguard_enabled'; then _setup_wireguard # Start Leak Monitor - if [[ ! -s /currentip ]]; then - bashio::log.warning "Could not fetch public ip, the vpn leakage service will not run" - else - _vpn_monitor_public_ip "WireGuard" & - fi + _vpn_monitor_public_ip "WireGuard" & fi