From 9e6b44610fd50a29e7a4b1d94a9b6cf02cdfb40b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 29 Dec 2023 21:08:49 -0600 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index c43849d8..10dc8775 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -624,7 +624,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ #### LOGGING OF SERVERROOM SENSOR DIFFERENCE if [ "${SENSOR}" == "ServerRoomLA-Probe" ]; then if [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference)) -ge 300 ]; then - if [ "${temp_f}" != "" ] && [ -f ${PW_TMPFOLDER}/.serverroomth ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.serverroomth)) -lt 60 ]; then + if [ "${temp_f}" != "" ] && [ -f ${PW_TMPFOLDER}/.serverroomth ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.serverroomth)) -lt 30 ]; then [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] && touch ${PW_TMPFOLDER}/.log.sr.difference temp_difference=$(bc <<< "scale=2; $(cat ${PW_TMPFOLDER}/.serveroomth)-${temp_f}") # (( $(bc <<<"${temp_difference} < 0") )) && temp_difference=`echo "scale=2; ${temp_difference} * -1" | bc` @@ -634,7 +634,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ fi fi elif [ "${SENSOR}" == "ServerRoomTH" ]; then - echo ${temp_f} > ${PW_TMPFOLDER}/.serverroomth + echo ${temp_f} >| ${PW_TMPFOLDER}/.serverroomth fi ###################