diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 9046d03e..27f963c1 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -645,7 +645,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ ##### ESXI FAN CONTROL ##### elif [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${SENSORa}]}"* ]] && [[ "${vSENSOR}" = *"Exhaust"* ]] && [ "${FanSpeed}" != "" ]; then ### GOLDILOCK ZONE ### - if (( $(bc <<< "${temp_f} >= ${GL_LOW}") )) && (( $(bc <<< "${temp_f} <= ${GL_HIGH}") )); then + if ((( $(bc <<< "${temp_f} >= ${GL_LOW}") )) && (( $(bc <<< "${temp_f} <= ${GL_HIGH}") ))) || [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ]; 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