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`