Update nodemgmt-scripts.sh

This commit is contained in:
2023-04-26 13:15:08 -05:00
parent d045ce4b2f
commit 1511b50197

View File

@@ -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