This commit is contained in:
2024-04-24 08:07:22 -05:00
parent aac99179ae
commit 93bf8621be
2 changed files with 10 additions and 1 deletions

View File

@@ -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 '

View File

@@ -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