From 473d26f40050d030f6dbb00138ddf5ad353f5a2a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 30 Jan 2024 19:36:04 -0600 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index a0dbd0a5..36a60f16 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -417,9 +417,9 @@ CHECKTEMP_SERVICE(){ if [ "${tsensor}" != "*" ]; then rm -f ${sensor} ((s_count++)) - # if [ ! -f ${PW_TMPFOLDER}/${tsensor}.down ] && [ -f ${PW_TMPFOLDER}/.lastfancheck/${tsensor} ]; then - # rm -f ${PW_TMPFOLDER}/.lastfancheck/${tsensor}* - # fi + if [ ! -f ${PW_TMPFOLDER}/${tsensor}.down ] && [ -f ${PW_TMPFOLDER}/.lastfancheck/${tsensor} ]; then + rm -f ${PW_TMPFOLDER}/.lastfancheck/${tsensor}* + fi fi done @@ -620,7 +620,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ # echo "${temp_f} -- scale=2; ${DEFAULT_ESXI_EXHAUST_MIN}+${ESXI_FANSPEED_GL_ZONE} - ${GL_HIGH} - ${GL_LOW}" ### GOLDILOCK ZONE ### if (( $(bc <<< "${temp_f} >= ${GL_LOW}") )) && (( $(bc <<< "${temp_f} <= ${GL_HIGH}") )); then - if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.gl ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set)) -ge 3600 ]; then + if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.gl ] && [ -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set)) -ge 3600 ]; then SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} FAN CONTROL" "Goldilock Zone Found at ${FanSpeed}%" echo "${FanSpeed}" >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.gl echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${FanSpeed}% - ${SET_HOST} - Goldilock Zone Found (1HR)" >> ${logtemp}