From da891b3afd8e3ff10b2c0d30a19613964bbbe86a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 29 Dec 2023 21:24:09 -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 e169928c..f0db2963 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -626,10 +626,10 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ if [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference)) -ge 3 ]; then if [ "${temp_f}" != "" ] && (( $(bc <<< "${temp_f} >= 2") )) && [ -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}") + temp_difference=$(bc <<< "scale=2; $(cat ${PW_TMPFOLDER}/.serverroomth)-${temp_f}") # (( $(bc <<<"${temp_difference} < 0") )) && temp_difference=`echo "scale=2; ${temp_difference} * -1" | bc` echo "$(date "+%Y-%m-%d %H:%M:%S")~${temp_difference}" >> ${PW_TMPFOLDER}/.log.sr.difference - echo "[$(date +'%Y-%m-%d %H:%M:%S')] ${temp_f} - $(cat ${PW_TMPFOLDER}/.serveroomth) = ${temp_difference}" + echo "[$(date +'%Y-%m-%d %H:%M:%S')] ${temp_f} - $(cat ${PW_TMPFOLDER}/.serverroomth) = ${temp_difference}" rm -f ${PW_TMPFOLDER}/.serverroomth fi fi