Update temp.inc.sh

This commit is contained in:
2024-01-30 10:18:19 -06:00
parent b2449e4442
commit acc020f4af

View File

@@ -595,7 +595,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
GL_HIGH=$(bc <<< "scale=2; ${DEFAULT_ESXI_EXHAUST_MIN}+${ESXI_FANSPEED_GL_ZONE}")
GL_LOW=$(bc <<< "scale=2; ${DEFAULT_ESXI_EXHAUST_MIN}-${ESXI_FANSPEED_GL_ZONE}")
echo "${temp_f} -- scale=2; ${DEFAULT_ESXI_EXHAUST_MIN}+${ESXI_FANSPEED_GL_ZONE} - ${GL_HIGH} - ${GL_LOW}"
if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] && (( $(bc <<< "${temp_f} < ${GL_HIGH}" )); then
if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] && (( $(bc <<< "${temp_f} < ${GL_HIGH}") )); then
echo 1-${SENSORa}
if [ ${FanSpeed} -ne ${DEFAULT_ESXI_FANSPEED} ]; then
if [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${SENSORa}]}"* ]]; then
@@ -609,7 +609,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
([ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} ] || [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSORa})" != "${FanSpeed}" ]) && echo "${FanSpeed}" >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}
[ -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.gl ] && rm -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.gl
elif (( $(bc <<< "${temp_f} >= ${GL_LOW}" )) && (( $(bc <<< "${temp_f} <= ${GL_HIGH}" )); then
elif (( $(bc <<< "${temp_f} >= ${GL_LOW}") )) && (( $(bc <<< "${temp_f} <= ${GL_HIGH}") )); then
echo 2-${SENSORa}
##GOLDILOCK ZONE
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} FAN CONTROL" "Goldilock Zone Found at ${FanSpeed}%"