Update temp.inc.sh

This commit is contained in:
2025-06-21 16:19:13 -05:00
parent 8d3803008e
commit 32771a5c1b

View File

@@ -869,6 +869,7 @@ CHECKTEMP_SERVICE(){
until [ $(ls ${PW_TMPFOLDER}/ztemprun.*.running 2>/dev/null | wc -l) -lt ${SCAN_THREADS} ]; do
tmp=tmp
done
echo "sensor: ${SENSORa}"
CHECKTEMP_SERVICE_RUNSENSOR ${SENSORa}
SENSORS_CHECKED+=(${SENSORa})
done
@@ -877,7 +878,7 @@ CHECKTEMP_SERVICE(){
for sensor in ${PW_TMPFOLDER}/ztemprun.*.done; do
tsensor=$(grep -oP '(?<=ztemprun.).*?(?=.done)' <<< "${sensor}")
if [ "${tsensor}" != "*" ]; then
echo "sensor: ${tsensor}"
# echo "sensor: ${tsensor}"
rm -f ${sensor}
((s_count++))
if [ -f ${PW_TMPFOLDER}/${tsensor}.down ] && [ -f ${PW_TMPFOLDER}/.lastfancheck/${tsensor}.set ] && [ "${PW_SENSOR_TYPE[${tsensor}]}" == "esxi" ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${tsensor}.set)) -ge 900 ]; then
@@ -957,6 +958,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
fi
if [ "${SENSORS_CHECK}" != "" ]; then
for SENSOR in "${SENSORS_CHECK[@]}"; do
echo "HERE-2: ${SENSOR}"
if [ "${PW_THRESHOLDS[${SENSORa}]}" != "" ]; then
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 1 | read temp_warn
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 2 | read temp_crit
@@ -1609,7 +1611,7 @@ SENDTEMP(){
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ] && ([ "${PW_SENSOR_TYPE[${SENSORa}]}" == "lacrosse" ] || ([ "${PW_REMOTE_SENSORS[${SENSORa}]}" != "" ] && [ "$(CHECK_HOST ${PW_REMOTE_SENSORS[${SENSORa}]})" != "false" ])); then
SENSORS_CHECK=(${SENSORa})
for SENSOR in "${SENSORS_CHECK[@]}"; do
echo "HERE: ${SENSOR} - ${SENSORa}"
# echo "HERE: ${SENSOR} - ${SENSORa}"
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ]; then
GAUGESH="'%"
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]]; then