Update temp.inc.sh

This commit is contained in:
2023-12-22 19:48:24 -06:00
parent 68ac55e10d
commit d8c23d5893

View File

@@ -75,13 +75,18 @@ CHECKTEMP(){
elif [ "${PW_SENSOR_TYPE[${SENSOR}]}" != "esxi" ] && [ "${temptype}" != "esxi" ]; then elif [ "${PW_SENSOR_TYPE[${SENSOR}]}" != "esxi" ] && [ "${temptype}" != "esxi" ]; then
[[ "${SENSOR}" == *"CPU-Usage"* ]] && echo -en "\033[1A" [[ "${SENSOR}" == *"CPU-Usage"* ]] && echo -en "\033[1A"
c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}" echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}"
[ "${avgdays}" != "noavg" ] && echo -en "Pulling data and calculating ${avgdays} Day average ... " || echo -en "Pulling data ... " [ "${avgdays}" != "noavg" ] && echo -en "Pulling data and calculating ${avgdays} Day average ... " || echo -en "Pulling data ... "
reading=$(CHECKTEMPSENSOR ${SENSOR} . . . . ${avgdays}) reading=$(CHECKTEMPSENSOR ${SENSOR} . . . . ${avgdays})
echo -e "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${reading}" echo -e "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${reading}${idsCL[Default]}"
else
echo -e "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Sensor Offline${idsCL[Default]}"
fi
echo echo
fi fi
fi fi
fi
done done
end=`date +%s`; runtime=$((end-start)); echo -e "\nruntime: ${runtime}" end=`date +%s`; runtime=$((end-start)); echo -e "\nruntime: ${runtime}"
[ "${PW_ACTION}" != "" ] && echo -e "${idsCL[Default]}" [ "${PW_ACTION}" != "" ] && echo -e "${idsCL[Default]}"