Update default.inc

This commit is contained in:
2024-08-05 20:23:06 -05:00
parent ec93c2f0ad
commit 2da03ec17c

View File

@@ -241,7 +241,8 @@ CHECK_HOST(){
if [ "$(dpkg-query -W --showformat='${Status}\n' nmap 2>/dev/null | grep "install ok installed")" != "" ]; then if [ "$(dpkg-query -W --showformat='${Status}\n' nmap 2>/dev/null | grep "install ok installed")" != "" ]; then
[ "$(nmap ${1} -p 22,80,443 -n | grep 'open ')" != "" ] || [ "$(nmap -sU ${1} -p 161 -n | grep 'open ')" != "" ] && echo true || echo false [ "$(nmap ${1} -p 22,80,443 -n | grep 'open ')" != "" ] || [ "$(nmap -sU ${1} -p 161 -n | grep 'open ')" != "" ] && echo true || echo false
else else
ping -c 3 ${1} > /dev/null 2>&1 # ping -c 3 ${1} > /dev/null 2>&1
ping -qw 2 -c1 ${1} > /dev/null 2>&1
[ $? -ne 0 ] && echo false || echo true [ $? -ne 0 ] && echo false || echo true
fi fi
else else