common.sh: use ipv4 only for ping test

This commit is contained in:
Aaron Bieber 2023-03-29 08:06:59 -06:00
parent 6ef407f441
commit a54ad796ae
No known key found for this signature in database

View File

@ -71,7 +71,7 @@ isRunHost() {
}
tsAlive() {
ping -c 1 -w 2 $1 >/dev/null 2>&1 && return 0
ping -4 -c 1 -w 2 $1 >/dev/null 2>&1 && return 0
tailscale ping --timeout 2s --c 1 --until-direct=false $1 >/dev/null 2>&1 && return 0
return 1
}