[viirb] viirb3: stop if successful ping

This commit is contained in:
Nico Schottelius 2020-11-04 10:57:44 +01:00
parent 659066f898
commit c86635ed56

View file

@ -58,6 +58,20 @@ cdist config -v -j8 ${vpn_endpoint_host} -c ${dot_cdist}
# Might take longer due to reboot
sleep 10
ping -c10 ${my_wireguard_ip}
ping -c10 ${my_lan_ip}
ping -c90 ${my_wifi_ip}
i=0
while [ $i -lt 10 ]; do
ping -c1 ${my_wireguard_ip} && break
i=$((i+1))
done
i=0
while [ $i -lt 10 ]; do
ping -c1 ${my_lan_ip} && break
i=$((i+1))
done
i=0
while [ $i -lt 10 ]; do
ping -c1 ${my_wifi_ip} && break
i=$((i+1))
done