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 72cb96561..605d5171d 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 @@ -10,35 +10,6 @@ if bashio::config.true 'silent'; then sed -i 's|/proc/1/fd/1 hassio;|off;|g' /etc/nginx/nginx.conf fi -# --- Helper Functions --- - -_fetch_public_ip() { - local resp - local url - local urls=( - "https://icanhazip.com" - "https://ifconfig.me/ip" - "https://api64.ipify.org" - "https://checkip.amazonaws.com" - "https://domains.google.com/checkip" - "https://ipinfo.io/ip" - ) - local shuffled_urls - mapfile -t shuffled_urls < <(printf "%s\n" "${urls[@]}" | shuf) - # Loop through the now-randomized list - for url in "${shuffled_urls[@]}"; do - resp=$(curl -fsS --max-time 5 "${url}" 2>/dev/null || true) - resp="${resp//[[:space:]]/}" - - # Validate IPv4 or IPv6 - if [[ "${resp}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]] || [[ "${resp}" =~ ^[0-9a-fA-F:]+$ ]]; then - printf '%s\n' "${resp}" - return 0 - fi - done - return 1 -} - # --- WireGuard Specific Logic --- _setup_wireguard() { @@ -165,8 +136,6 @@ if [[ "${openvpn_enabled}" == true && "${wireguard_enabled}" == true ]]; then exit 1 fi -echo "$(_fetch_public_ip || true)" > /currentip - if [[ "${openvpn_enabled}" == true ]]; then exec /usr/sbin/openvpn \