Update temp.inc.sh

This commit is contained in:
2024-06-30 13:09:53 -05:00
parent 51ff160657
commit 29e5b80182

View File

@@ -426,6 +426,7 @@ CHECKTEMP(){
c=0; spc=''; spc1=`expr ${cw} - ${#sensorname} - 1`; until [ ${c} = ${spc1} ]; do spc="${spc} "; ((c++)); done c=0; spc=''; spc1=`expr ${cw} - ${#sensorname} - 1`; until [ ${c} = ${spc1} ]; do spc="${spc} "; ((c++)); done
IFS=: read -r temp_f temp_h <<< $(CHECKTEMPSENSOR ${SENSOR}); unset IFS IFS=: read -r temp_f temp_h <<< $(CHECKTEMPSENSOR ${SENSOR}); unset IFS
if [ "${TTYPE}" != "fans" ] || ([ "${TTYPE}" == "fans" ] && [[ "${sensorname}" = *"Exhaust"* ]]); then
if [ $(bc -l <<< "${temp_f} >= ${temp_crit}") -eq 1 ] || ([ "${TTYPE}" == "fans" ] && [ $(bc -l <<< "${temp_f} > $(bc <<< "scale=2; ${GL_HIGH}+5")") -eq 1 ]); then if [ $(bc -l <<< "${temp_f} >= ${temp_crit}") -eq 1 ] || ([ "${TTYPE}" == "fans" ] && [ $(bc -l <<< "${temp_f} > $(bc <<< "scale=2; ${GL_HIGH}+5")") -eq 1 ]); then
lclr="${idsCL[LightRed]}" lclr="${idsCL[LightRed]}"
lmd="CRITICAL" lmd="CRITICAL"
@@ -439,6 +440,10 @@ CHECKTEMP(){
lclr="${idsCL[Green]}" lclr="${idsCL[Green]}"
lmd="Normal " lmd="Normal "
fi fi
else
lclr=""
lmd=" "
fi
c=0; spct=''; spc1=`expr 7 - ${#temp_f}`; until [ ${c} = ${spc1} ]; do spct="${spct} "; ((c++)); done c=0; spct=''; spc1=`expr 7 - ${#temp_f}`; until [ ${c} = ${spc1} ]; do spct="${spct} "; ((c++)); done
reading="${lclr}${lmd}${spct}${temp_f}${GAUGESH}" reading="${lclr}${lmd}${spct}${temp_f}${GAUGESH}"
echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading} " echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading} "