Update temp.inc.sh

This commit is contained in:
2023-12-26 13:48:07 -06:00
parent 344d97a9ba
commit 390318ec2e

View File

@@ -96,7 +96,13 @@ CHECKTEMPSENSOR(){
echo ${PW_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn
echo ${PW_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
fi
[ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ] && GAUGESH="'%" || GAUGESH="'F"
if [ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ]; then
GAUGESH="'%"
elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ] && [[ "${1}" = *"FAN"* ]]; then
GAUGESH="'RPM"
else
GAUGESH="'F"
fi
if [ "${6}" != "noavg" ]; then
[ "${6}" != "" ] && [[ "${6}" =~ ^[0-9]+$ ]] && avgdays=${6} || avgdays=3