diff --git a/defaults.inc b/defaults.inc index d0702eca..9c6f3435 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.7.14-04232024' +VERS='2.7.15-04242024' noheader=' update service dailytemp confsync -r -report ' diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 229fe783..3971bea2 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -838,6 +838,15 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ ##### ESXI FAN CONTROL ##### elif [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${SENSORa}]}"* ]] && [[ "${vSENSOR}" = *"Exhaust"* ]] && [ "${FanSpeed}" != "" ]; then + + if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ]; then + SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} FanSpeed Control" "Re-enabling Host Fan control to Powerwall" + rm -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}* + ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSORa}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x01 0x00 >/dev/null 2>&1 + [ "${SENSORa}" == "iDS-vMS-Host7" ] && ipmitool -I lanplus -H 10.10.2.26 -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x01 0x00 >/dev/null 2>&1 + + fi + ### GOLDILOCK ZONE ### 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