From 4d82cb94419cd41f1580b44c4fd7b68b0f61e1da Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 22 Apr 2024 19:17:29 -0500 Subject: [PATCH] update --- defaults.inc | 2 +- inc/temp.inc.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/defaults.inc b/defaults.inc index d4441acc..35458886 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.7.6-04222024' +VERS='2.7.7-04222024' noheader=' update service dailytemp confsync -r -report ' diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 537ec0d0..dd398ce2 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -1008,17 +1008,18 @@ Previous Temp: ${last_temp}${GAUGESH}" # fi fi + #### TRACKING TEMP CHANGES if [ "${temp_f}" != "" ] && [[ "${SENSOR}" != *"CPU-Usage"* ]] && [[ "${SENSOR}" != *"FAN"* ]]; then if [ ! -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre ]; then echo "${temp_f}" > ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre elif ([ ! -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre)) -ge 1800 ]) || ([ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old)) -ge 1800 ]); then - mv ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old 2> /dev/null + [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old ] && mv -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 + mv -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old + sleep 1s echo "${temp_f}" > ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre fi - else - rm -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.* fi #### LOGGING OF SERVERROOM SENSOR DIFFERENCE