fix: absolute paths; no env vars

This commit is contained in:
Jeffrey Serio 2025-03-23 12:55:05 -05:00
parent ecd0f7cfa2
commit 66aa7dfe54

View File

@ -1,13 +1,12 @@
#!/bin/sh #!/bin/sh
PORT=$(natpmpc -a 1 0 udp 60 -g 10.2.0.1 | grep "Mapped public port" | awk '{print $4}') /usr/local/bin/natpmpc -a 1 0 udp 60 -g 10.2.0.1 | grep "Mapped public port" | awk '{print $4}' | tee /usr/local/etc/natvpn_port.txt
echo "$PORT" | tee /usr/local/etc/natvpn_port.txt
while true; do while true; do
date date
natpmpc -a 1 0 udp 60 -g 10.2.0.1 && natpmpc -a 1 0 tcp 60 -g 10.2.0.1 || { if ! /usr/local/bin/natpmpc -a 1 0 udp 60 -g 10.2.0.1 && /usr/local/bin/natpmpc -a 1 0 tcp 60 -g 10.2.0.1; then
echo "error Failure natpmpc $(date)" echo "error Failure natpmpc $(date)"
break break
} fi
sleep 45 sleep 45
done done