Update temp.inc.sh

This commit is contained in:
2024-04-29 09:30:56 -05:00
parent 03d5497b00
commit 682c5832db

View File

@@ -92,7 +92,7 @@ CHECKTEMP(){
fi
fi
done
if [ "${sensorqry}" != "" ]; then
if [ "${sensorsqry}" != "" ]; then
declare -A RANGE_TEMPS
for R in ${PW_TEMPIND_RANGE[@]}; do
RANGE_TEMPS[${R}]=($(${mysql_conn} -e "SELECT sensorid,temp FROM servermonitor.sensor_data WHERE sensorid IN (${sensorqry}) AND date >= DATE_SUB(NOW(), INTERVAL ${R} MINUTE) AND date <= DATE_SUB(NOW(), INTERVAL $(expr ${R} - 7) MINUTE) ORDER BY date ASC LIMIT 1"))