Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-07 13:57:49 -06:00
parent 5f4ae4f416
commit e5a0dbfe80

View File

@@ -53,6 +53,17 @@ STATUS() {
lip=$(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1)
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME} (${lip})${idsST[Reset]}${idsCL[LightCyan]} - localhost${idsCL[Default]}"
DIVIDER false green
ping -c 3 $SERVERIP > /dev/null 2>&1
if [ $? -ne 0 ]
then
# Use your favorite mailer here:
mailx -s "Server $SERVERIP is down" -t "$NOTIFYEMAIL" < /dev/null
fiping -c 3 $SERVERIP > /dev/null 2>&1
if [ $? -ne 0 ]
then
# Use your favorite mailer here:
mailx -s "Server $SERVERIP is down" -t "$NOTIFYEMAIL" < /dev/null
fi
for srvc in "${LOCAL_SERVICES[@]}"
do
c=0; cw=22; spc=''