Update temp.inc.sh
This commit is contained in:
@@ -210,8 +210,8 @@ CHECKTEMPSENSOR(){
|
|||||||
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
|
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
|
||||||
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
|
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
|
||||||
echo -e "${spc}[${spcw}${idsCL[Yellow]}${temp_warn_disp}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit_disp}${GAUGESH}=>${idsCL[Default]} ]"
|
echo -e "${spc}[${spcw}${idsCL[Yellow]}${temp_warn_disp}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit_disp}${GAUGESH}=>${idsCL[Default]} ]"
|
||||||
|
|
||||||
if [ "${1}" == "ServerRoomLA" ]; then
|
if [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then
|
||||||
temp_probe_f=$(bc <<< "scale=2; ${temp_probe_c}*1.8+32")
|
temp_probe_f=$(bc <<< "scale=2; ${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
|
||||||
@@ -231,14 +231,19 @@ CHECKTEMPSENSOR(){
|
|||||||
averagedisp="${idsCL[Green]}${average}"
|
averagedisp="${idsCL[Green]}${average}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $(bc -l <<< "${temp_probe_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_probe_f} < ${temp_crit}") -eq 1 ]; then
|
if [ $(bc -l <<< "${temp_probe_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_probe_f} < ${temp_crit}") -eq 1 ]; then
|
||||||
[ "${average}" != "" ] && echo -en "${idsCL[Yellow]}WARNING ${spct}${temp_probe_f}${GAUGESH} /${spca}${averagedisp}${GAUGESH}${idsCL[Default]}" || echo -en "${idsCL[Yellow]}WARNING ${spct}${temp_probe_f}${GAUGESH}${idsCL[Default]}"
|
lclr="${idsCL[Yellow]}"
|
||||||
|
lmd="WARNING "
|
||||||
elif [ $(bc -l <<< "${temp_probe_f} >= ${temp_crit}") -eq 1 ]; then
|
elif [ $(bc -l <<< "${temp_probe_f} >= ${temp_crit}") -eq 1 ]; then
|
||||||
[ "${average}" != "" ] && echo -en "${idsCL[LightRed]}CRITICAL${spct}${temp_probe_f}${GAUGESH} /${spca}${averagedisp}${GAUGESH}${idsCL[Default]}" || echo -en "${idsCL[LightRed]}CRITICAL${spct}${temp_probe_f}${GAUGESH}${idsCL[Default]}"
|
lclr="${idsCL[LightRed]}"
|
||||||
|
lmd="CRITICAL"
|
||||||
else
|
else
|
||||||
[ "${average}" != "" ] && echo -en "${idsCL[Green]}Normal ${spct}${temp_probe_f}${GAUGESH} /${spca}${averagedisp}${GAUGESH}${idsCL[Default]}" || echo -en "${idsCL[Green]}Normal ${spct}${temp_probe_f}${GAUGESH}${idsCL[Default]}"
|
lclr="${idsCL[Green]}"
|
||||||
|
lmd="Normal "
|
||||||
fi
|
fi
|
||||||
# [ "${average}" != "" ] && echo -en ' '
|
echo -en "${lclr}Normal ${spct}${temp_probe_f}${GAUGESH}"
|
||||||
|
[ "${average}" != "" ] && echo -en " /${spca}${averagedisp}${GAUGESH}"
|
||||||
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]} ]"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user