Update nodemgmt-scripts.sh
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user