From 495f589dc586a68b4751dce888ca85caa164c2a0 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 25 Jul 2019 20:36:38 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index a1a472c0..271039d5 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -226,6 +226,9 @@ STATUS(){ fi done else + if [ ! -f ${FOLDER}/${nip}.down ]; then + touch ${FOLDER}/${nip}.down + fi errtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}.down) if [ $errtime -gt ${RENOTIFY} ]; then if [ ! -f ${FOLDER}/${nip}.errtime ]; then @@ -241,7 +244,6 @@ STATUS(){ echo -e "${idsCL[Red]}Node is Down!${idsCL[Default]}" fi fi - touch ${FOLDER}/${nip}.down fi if [ "${ST_ACTION}" != "check" ]; then echo; fi nid=`expr $nid + 1`