From 1511b50197e79df038b84cc28acf3a1bcbd1b08b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 26 Apr 2023 13:15:08 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 6623f79f..668665ca 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -418,15 +418,14 @@ STATUS(){ # checkhost=$(CHECK_HOST ${nip}) #if [ "${checkhost}" != "false" ]; then - if [ ! -f ${FOLDER}/${!PH}.down ] || [ ! -f ${FOLDER}/${nip}.down ]; then + if [ ! -f ${FOLDER}/${!PH}.down ] && [ ! -f ${FOLDER}/${nip}.down ]; then if [ -f ${FOLDER}/${nip}.down ]; then if [ -f ${FOLDER}/${nip}.errtime ]; then toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}.errtime) else toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}.down) fi - rm -f ${FOLDER}/${nip}.down - rm -f ${FOLDER}/${nip}.errtime + SENDNOTICE "${NM_NODETYPES[$NTYPE]}-Node${nid}-${nip}-UP" "${NM_NODETYPES[$NTYPE]}-Node${nid} is back UP! It was down for $(SHOW_TIME ${toterrtime})" fi