From 3f33a76ed2f98a773b5f8bdd5984be76edde544c Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Sat, 11 Apr 2026 08:29:54 -0500 Subject: [PATCH] media: natpmpc-helper sleep before apk install (VPN must be up first) --- servers/legion/k8s/media/gluetun-qbittorrent.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/servers/legion/k8s/media/gluetun-qbittorrent.yaml b/servers/legion/k8s/media/gluetun-qbittorrent.yaml index 4902637..a0548d6 100644 --- a/servers/legion/k8s/media/gluetun-qbittorrent.yaml +++ b/servers/legion/k8s/media/gluetun-qbittorrent.yaml @@ -74,9 +74,13 @@ spec: - sh - -c - | - apk add -q libnatpmp curl 2>/dev/null - echo "Waiting for VPN and qBittorrent to start..." + echo "Waiting for VPN to establish before installing packages..." sleep 30 + until apk add -q libnatpmp curl 2>/dev/null; do + echo "apk failed (VPN not ready?), retrying in 10s..." + sleep 10 + done + echo "Packages installed, starting NAT-PMP loop" while true; do # Request port forwarding from ProtonVPN NAT-PMP gateway OUT=$(natpmpc -a 0 0 udp 60 -g 10.2.0.1 2>&1)