Update temp.inc.sh
This commit is contained in:
@@ -173,14 +173,14 @@ CHECKTEMPSENSOR(){
|
|||||||
echo -e "${spc}[${spcw}${idsCL[Yellow]}${temp_warn}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit}${GAUGESH}=>${idsCL[Default]} ]"
|
echo -e "${spc}[${spcw}${idsCL[Yellow]}${temp_warn}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit}${GAUGESH}=>${idsCL[Default]} ]"
|
||||||
|
|
||||||
if [ "${1}" == "ServerRoomLA" ]; then
|
if [ "${1}" == "ServerRoomLA" ]; then
|
||||||
unset average
|
|
||||||
temp_probe_f=$(bc <<< "scale=1; ${temp_probe_c}*1.8+32")
|
temp_probe_f=$(bc <<< "scale=1; ${temp_probe_c}*1.8+32")
|
||||||
tmp="${spct}${temp_probe_f}"
|
tmp="${spct}${temp_probe_f}"
|
||||||
c=0; spc=''; spc1=`expr 10 - ${#tmp}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
|
c=0; spc=''; spc1=`expr 10 - ${#tmp}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
|
||||||
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
|
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
|
||||||
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
|
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
|
||||||
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${1}-Probe ${idsST[Reset]}${spc}${idsCL[Default]}: "
|
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})
|
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
|
c=0; spca=''; spc1=`expr 6 - ${#average}`; until [ ${c} = ${spc1} ]; do spca="${spca} "; c=`expr ${c} + 1`; done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user