Update temp.inc.sh
This commit is contained in:
@@ -174,6 +174,11 @@ CHECKTEMPSENSOR(){
|
||||
|
||||
if [ "${1}" == "ServerRoomLA" ]; then
|
||||
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]}${SENSOR}-Probe${idsST[Reset]}${spc}${idsCL[Default]}: "
|
||||
echo "HERE: ${temp_probe_c} - ${temp_probe_f}"
|
||||
if [ $(bc -l <<< "${temp_probe_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_probe_f} < ${temp_crit}") -eq 1 ]; then
|
||||
echo -en "${idsCL[Yellow]}WARNING ${spct}${temp_probe_f}${GAUGESH}${idsCL[Default]}"
|
||||
@@ -182,12 +187,6 @@ CHECKTEMPSENSOR(){
|
||||
else
|
||||
echo -en "${idsCL[Green]}Normal ${spct}${temp_probe_f}${GAUGESH}${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
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]}${SENSOR}-Probe${idsST[Reset]}${spc}${idsCL[Default]}: "
|
||||
echo -e "${spc}[${spcw}${idsCL[Yellow]}${temp_warn}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit}${GAUGESH}=>${idsCL[Default]} ]"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user