media: natpmpc-helper sleep before apk install (VPN must be up first)
This commit is contained in:
@@ -74,9 +74,13 @@ spec:
|
|||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
apk add -q libnatpmp curl 2>/dev/null
|
echo "Waiting for VPN to establish before installing packages..."
|
||||||
echo "Waiting for VPN and qBittorrent to start..."
|
|
||||||
sleep 30
|
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
|
while true; do
|
||||||
# Request port forwarding from ProtonVPN NAT-PMP gateway
|
# Request port forwarding from ProtonVPN NAT-PMP gateway
|
||||||
OUT=$(natpmpc -a 0 0 udp 60 -g 10.2.0.1 2>&1)
|
OUT=$(natpmpc -a 0 0 udp 60 -g 10.2.0.1 2>&1)
|
||||||
|
|||||||
Reference in New Issue
Block a user