From f2f9221e3f1167161870d7dcf255ff88e979f1b2 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 1 Jan 2023 09:46:39 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index e2d047fb..0a9bd1c4 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -216,7 +216,7 @@ STATUS(){ mysqlgo=true fi # echo "mysqlgo=${mysqlgo}" - if [ "${srvctst}" != "active" ] && [ "${mysqlgo}" != "true" ]; then + if [ "${srvctst}" != "active" ] && [ ${mysqlgo} != true ]; then if [ ! -f ${FOLDER}/${nip}-${srvc}.down ]; then if [ "${ST_ACTION}" != "check" ]; then @@ -232,15 +232,15 @@ STATUS(){ mv ${FOLDER}/${nip}-${srvc}.down ${FOLDER}/${nip}-${srvc}.errtime fi toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}-${srvc}.errtime) - if [ "${ST_ACTION}" != "check" ]; then - echo -e "${idsCL[Red]}Not running for $(SHOW_TIME ${toterrtime})${idsCL[Default]}" - fi # if [ "${EMAIL_NOTICE}" != "" ]; then echo "${NM_SERVICES[${srvc}]} has been down for $(SHOW_TIME ${toterrtime})" | mail -s "${NM_NODETYPES[$NTYPE]}-Node${nid}-${nip}" ${EMAIL_NOTICE}; fi touch ${FOLDER}/${nip}-${srvc}.down if [ "${srvc}" = "mysql" ]; then ${NCMD} systemctl restart ${srvc} fi fi + if [ "${ST_ACTION}" != "check" ]; then + echo -e "${idsCL[Red]}Not running for $(SHOW_TIME ${toterrtime})${idsCL[Default]}" + fi fi else if [ "${ST_ACTION}" != "check" ]; then