Update default.inc
This commit is contained in:
@@ -241,7 +241,8 @@ CHECK_HOST(){
|
||||
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
|
||||
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
|
||||
fi
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user