Update temp.inc.sh

This commit is contained in:
2024-01-30 17:02:39 -06:00
parent 0f5e02e1f6
commit 6730eb99ce

View File

@@ -128,9 +128,10 @@ CHECKTEMP(){
c=0; spc=''; spc1=`expr ${cw} - ${#sensorname} - 1`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
[ "${avgdays}" != "noavg" ] && echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Calculating ${avgdays_disp} average ... "
reading=$(CHECKTEMPSENSOR ${SENSOR} ${temp_c} ${temp_warn} ${temp_crit} ${sensorname// /_} ${avgdays})
reading=$(CHECKTEMPSENSOR ${SENSOR} ${temp_c} ${temp_warn} ${temp_crit} ${sensorname// /_} ${avgdays} ${temptype})
[ "${avgdays}" != "noavg" ] && echo -en "\r\033[K"
echo -e "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading}"
fi
((t++))
done
@@ -310,7 +311,12 @@ CHECKTEMPSENSOR(){
echo -en "${lclr}${lmd}${spct}${temp_f_disp}${GAUGESH}"
[ "${average}" != "" ] && echo -en " /${spca}${averagedisp}${GAUGESH}"
if [[ "${1}" != *"FAN"* ]]; then
if [ "${7}" == "fans" ]; then
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 -en "${idsCL[Default]}${spc}[${spcw}${idsCL[Yellow]}${GL_HIGH}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${GL_LOW}${GAUGESH}=>${idsCL[Default]} ]"
elif [[ "${1}" != *"FAN"* ]]; then
tmp="${spct}${temp_f_disp}${GAUGESH}"
c=0; spc=''; spc1=`expr 12 - ${#tmp}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '