From c91cb8cc9b033d422df87028bb5cf53fe18e94ab Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 29 Nov 2023 15:02:30 -0600 Subject: [PATCH] Update status.inc --- inc/status.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/status.inc b/inc/status.inc index 69f8b184..f667b5ec 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -255,7 +255,7 @@ STATUS(){ fi if [ "${srvctest}" != "active" ] && [ "${mysqlgo}" != "true" ]; then if [ ! -f ${NM_TMPFOLDER}/${nip}~${srvc}.down ]; then - [ "${ST_ACTION}" != "check" ] && echo -e "${idsCL[Red]}Not Running${idsCL[Default]}" + [ "${ST_ACTION}" != "check" ] && echo -en "${idsCL[Red]}Not Running" touch ${NM_TMPFOLDER}/${nip}~${srvc}.down # SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_SERVICE_DESC[${srvc}]} is down" 1 echo "$(date +%Y-%m-%d-%H-%M-%S) - ${nip} - ${NM_HOSTNAMES[${nip}]}[${nip}] - ${NM_SERVICE_DESC[${srvc}]} is down" >> ${NM_LOGFILE} @@ -274,10 +274,10 @@ STATUS(){ SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_SERVICE_DESC[${srvc}]} is down" 1 fi - [ "${ST_ACTION}" != "check" ] && echo -e "${idsCL[Red]}Not running for $(SHOW_TIME ${toterrtime})${idsCL[Default]}" + [ "${ST_ACTION}" != "check" ] && echo -en "${idsCL[Red]}Not running for $(SHOW_TIME ${toterrtime})" fi else - [ "${ST_ACTION}" != "check" ] && echo -e "${idsCL[LightGreen]}Running${idsCL[Default]}" + [ "${ST_ACTION}" != "check" ] && echo -en "${idsCL[LightGreen]}Running" if [ -f ${NM_TMPFOLDER}/${nip}~${srvc}.down ]; then [ -f ${NM_TMPFOLDER}/${nip}~${srvc}.errtime ] && toterrtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}~${srvc}.errtime) || toterrtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}~${srvc}.down) SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_SERVICE_DESC[${srvc}]} is back UP! It was down for $(SHOW_TIME ${toterrtime})"