This commit is contained in:
2023-12-30 10:57:39 -06:00
parent c708d8929d
commit 18ab96b904
4 changed files with 6 additions and 301 deletions

View File

@@ -231,42 +231,6 @@ CHECKTEMPSENSOR(){
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
echo -e "${idsCL[Default]}${spc}[${spcw}${idsCL[Yellow]}${temp_warn_disp}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit_disp}${GAUGESH}=>${idsCL[Default]} ]"
# if [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then
# temp_probe_f=$(bc <<< "scale=2; ${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 [ "${average}" != "" ]; then
# 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
# if [ "${average}" == "" ]; then
# averagedisp="${idsCL[Green]}"
# elif [ $(bc -l <<< "${average} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${average} < ${temp_crit}") -eq 1 ]; then
# averagedisp="${idsCL[Yellow]}${average}"
# elif [ $(bc -l <<< "${average} >= ${temp_crit}") -eq 1 ]; then
# averagedisp="${idsCL[LightRed]}${average}"
# else
# averagedisp="${idsCL[Green]}${average}"
# fi
# fi
#
# if [ $(bc -l <<< "${temp_probe_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_probe_f} < ${temp_crit}") -eq 1 ]; then
# lclr="${idsCL[Yellow]}"
# lmd="WARNING "
# elif [ $(bc -l <<< "${temp_probe_f} >= ${temp_crit}") -eq 1 ]; then
# lclr="${idsCL[LightRed]}"
# lmd="CRITICAL"
# else
# lclr="${idsCL[Green]}"
# lmd="Normal "
# fi
# 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]} ]"
#
# fi
else
echo -e "${idsCL[Yellow]}Sensor Offline${idsCL[Default]}"
fi