Update temp.inc.sh

This commit is contained in:
2024-01-27 19:55:09 -06:00
parent ccf763a641
commit 7896a2c8c9

View File

@@ -542,9 +542,9 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn
echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 2 | read temp_crit echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 2 | read temp_crit
echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 3 | read temp_crit_sys echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 3 | read temp_crit_sys
echo "HERE: ${SENSORa} - ${vSENSOR}"
if [[ "${vSENSOR}" = *"Exhaust"* ]]; then
if [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${SENSORa}]}"* ]]; then elif [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${SENSORa}]}"* ]] && [[ "${vSENSOR}" = *"Exhaust"* ]]; then
if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set)) -ge 600 ]; then if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set)) -ge 600 ]; then
if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] && (( $(bc <<< "${temp_f} < 100") )); then if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] && (( $(bc <<< "${temp_f} < 100") )); then
if [ ${FanSpeed} -ne ${DEFAULT_ESXI_FANSPEED} ]; then if [ ${FanSpeed} -ne ${DEFAULT_ESXI_FANSPEED} ]; then
@@ -591,9 +591,6 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
[ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] && echo "${FanSpeed}" >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] && echo "${FanSpeed}" >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set
fi fi
fi fi
fi
fi
if [[ "${SENSORa}" != *"-Usage"* ]] && [[ "${SENSORa}" != *"FAN"* ]] && (( $(bc <<< "${temp_f} < ${temp_warn}") )); then if [[ "${SENSORa}" != *"-Usage"* ]] && [[ "${SENSORa}" != *"FAN"* ]] && (( $(bc <<< "${temp_f} < ${temp_warn}") )); then
if (( $(bc <<< "${last_temp} >= 1") )); then if (( $(bc <<< "${last_temp} >= 1") )); then