diff --git a/openwrt/viwib-2-configure.sh b/openwrt/viwib-2-configure.sh index 1c582d2..ce2d83c 100755 --- a/openwrt/viwib-2-configure.sh +++ b/openwrt/viwib-2-configure.sh @@ -36,11 +36,12 @@ public_key=$(echo $private_key | wg pubkey) vpn_endpoint_host=vpn-2a0ae5c1600.ungleich.ch vpn_endpoint_pubkey=ygZQW3OSiMJl/RpKyaJVE0GSt6bjEDnoxdMJsNiloRE= -ping -c3 ${viwib_ip} -if [ $? -ne 0 ]; then - echo "Cannot reach ${viwib_ip}, aborting" - exit 1 -fi +i=0 +while [ $i -lt 30 ]; do + echo "Trying to reach ${viwib_ip} ($i)" + ping -c1 ${viwib_ip} >/dev/null && break + i=$((i+1)) +done cat <