Change alive to check

This commit is contained in:
Donald Burr 2015-02-19 12:00:25 -08:00
parent dd2c169ad0
commit a78c229e92

View file

@ -1,14 +0,0 @@
#!/bin/sh
if [ -z "$1" ]; then
HOSTS="`grep -v ^# MASTER_LIST | cut -d\| -f3`"
else
HOSTS="`cat \"$1\"`"
fi
for HOST in $HOSTS; do
ping -c 3 -q $HOST 2>&1 >/dev/null
if [ $? -eq 0 ]; then
echo -e "\033[1;37m\033[42m[ UP ]\033[0m $HOST"
else
echo -e "\033[1;37m\033[41m[DOWN]\033[0m $HOST"
fi
done