From 6666a37f2594148a89186095d8705e6c7be5ec81 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 1 Jan 2024 09:52:22 -0600 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 99fbffc8..00a3e4b2 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -562,16 +562,16 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ fi fi fi - + [ -f ${PW_TMPFOLDER}/${SENSOR}.insert ] && lastinsert=$(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}.insert)) || lastinsert=100000 if [ "$(compgen -G "${PW_TMPFOLDER}/temp.*")" != "" ] || [ -f ${PW_TMPFOLDER}/power.ac.low ] || [ -f ${PW_TMPFOLDER}/power.dc.low ]; then wait=$(echo "scale=0; ${PW_MYSQL_LOG_INTERVAL_ABNORMAL}*60" | bc) else wait=$(echo "scale=0; ${PW_MYSQL_LOG_INTERVAL_NORMAL}*60" | bc) fi - - # [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "lacrosse" ] && temp_probe_f=$(bc <<< "scale=2; ${temp_probe_c}*1.8+32") - + + echo "HERE: ${SENSOR} - ${lastinsert} - ${wait}" + if [ "${PW_SENSOR_ID[${SENSORa}]}" != "" ] && [ ${lastinsert} -ge ${wait} ]; then if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ]; then entityid=($(${mysql_conn} -e "SELECT id FROM servermonitor.entities WHERE BINARY name='${vSENSOR// /_}' AND sensorid='${PW_SENSOR_ID[${SENSORa}]}'"))