diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 936c4ff0..f99c9d63 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -426,18 +426,23 @@ CHECKTEMP(){ 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 - 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]}" - lmd="CRITICAL" - elif ([ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]) || ([ "${TTYPE}" == "fans" ] && [ $(bc -l <<< "${temp_f} > $(bc <<< "scale=2; ${GL_HIGH}")") -eq 1 ]); then - lclr="${idsCL[Yellow]}" - lmd="WARNING " - elif [ "${TTYPE}" == "fans" ] && [ $(bc -l <<< "${temp_f} < ${GL_LOW}") -eq 1 ]; then - lclr="${idsCL[LightCyan]}" - lmd="COOL " + 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 + lclr="${idsCL[LightRed]}" + lmd="CRITICAL" + elif ([ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]) || ([ "${TTYPE}" == "fans" ] && [ $(bc -l <<< "${temp_f} > $(bc <<< "scale=2; ${GL_HIGH}")") -eq 1 ]); then + lclr="${idsCL[Yellow]}" + lmd="WARNING " + elif [ "${TTYPE}" == "fans" ] && [ $(bc -l <<< "${temp_f} < ${GL_LOW}") -eq 1 ]; then + lclr="${idsCL[LightCyan]}" + lmd="COOL " + else + lclr="${idsCL[Green]}" + lmd="Normal " + fi else - lclr="${idsCL[Green]}" - lmd="Normal " + lclr="" + lmd=" " fi c=0; spct=''; spc1=`expr 7 - ${#temp_f}`; until [ ${c} = ${spc1} ]; do spct="${spct} "; ((c++)); done reading="${lclr}${lmd}${spct}${temp_f}${GAUGESH}"