Update temp.inc.sh
This commit is contained in:
@@ -118,11 +118,8 @@ CHECKTEMP(){
|
||||
[ ${REPORT} -eq 0 ] && echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR_DESC}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Pulling data ... "
|
||||
|
||||
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
||||
echo 1
|
||||
IFS=: read -r temp_f temp_h <<< $(CHECKTEMPSENSOR ${SENSOR}); unset IFS
|
||||
echo 2
|
||||
if [ "${temp_f}" != "timeout" ] && [ "${temp_f}" != "offline" ]; then
|
||||
echo 3
|
||||
[ "${PW_SENSOR_TYPE[${SENSOR}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]] && temp_f_disp=$(IDS_NUMBER_FORMAT ${temp_f} 0) || temp_f_disp=${temp_f}
|
||||
if [ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]; then
|
||||
lclr="${idsCL[Yellow]}"
|
||||
@@ -134,10 +131,9 @@ CHECKTEMP(){
|
||||
lclr="${idsCL[Green]}"
|
||||
lmd="Normal "
|
||||
fi
|
||||
echo 4
|
||||
c=0; spct=''; [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]] && spc1=`expr 6 - ${#temp_f}` || spc1=`expr 0 - ${#temp_f}`
|
||||
c=0; spct=''; [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]] && spc1=`expr 6 - ${#temp_f}` || spc1=`expr 7 - ${#temp_f}`
|
||||
echo "${temp_f} = ${#temp_f}"
|
||||
until [ ${c} = ${spc1} ]; do spct="${spct} "; ((c++)); done
|
||||
echo 5
|
||||
reading="${lclr}${lmd}${spct}"$(IDS_NUMBER_FORMAT ${temp_f})"${GAUGESH}"
|
||||
[ ${REPORT} -eq 0 ] && echo -en "\r\033[K"
|
||||
echo -en "${idsCL[White]}${idsST[Bold]}${SENSOR_DESC}${idsST[Reset]}${spc}${idsCL[Default]}: ${reading} "
|
||||
|
||||
Reference in New Issue
Block a user