diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index dcb28488..160afba2 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -173,14 +173,14 @@ CHECKTEMPSENSOR(){ echo -e "${spc}[${spcw}${idsCL[Yellow]}${temp_warn}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit}${GAUGESH}=>${idsCL[Default]} ]" if [ "${1}" == "ServerRoomLA" ]; then - unset average temp_probe_f=$(bc <<< "scale=1; ${temp_probe_c}*1.8+32") tmp="${spct}${temp_probe_f}" c=0; spc=''; spc1=`expr 10 - ${#tmp}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done [ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' ' [ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' ' echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${1}-Probe ${idsST[Reset]}${spc}${idsCL[Default]}: " - if [ "${6}" != "noavg" ]; then + if [ "${average}" != "" ]; then + average='' average=$(AVERAGETEMP ${PW_SENSOR_ID["${1}-Probe"]} ${avgdays}) c=0; spca=''; spc1=`expr 6 - ${#average}`; until [ ${c} = ${spc1} ]; do spca="${spca} "; c=`expr ${c} + 1`; done fi