From b7650cac2aa3f84e5df4c18fad557f03efc35bc4 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 20 Dec 2023 09:02:18 -0600 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 963989f7..05a4de15 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -367,7 +367,7 @@ CHECKTEMP_SERVICE(){ if (( $(bc <<< "${temp_f} < ${temp_warn}") )); then if (( $(bc <<< "${last_temp[${SENSOR//-/}]} > 1") )); then - [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSORa}.down)) -ge 1800 ] && SENDNOTICE "${SENSOR} BACK TO NORMAL" "NORMAL TEMP: ${temp_f}${GAUGESH} + [ -f ${PW_TMPFOLDER}/${SENSORa}.down ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSORa}.down)) -ge 1800 ] && SENDNOTICE "${SENSOR} BACK TO NORMAL" "NORMAL TEMP: ${temp_f}${GAUGESH} Previous Temp: ${last_temp[${SENSOR//-/}]}${GAUGESH}" echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - Back to NORMAL ${GAUGE} - Previous ${GAUGE}: ${last_temp[${SENSOR//-/}]}${GAUGESH}" >> ${logtemp} echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - ${SENSOR} - Back to NORMAL ${GAUGE}" >> ${PW_LOGFILE}