Update temp.inc.sh

This commit is contained in:
2024-04-29 09:40:10 -05:00
parent 8e36e689a3
commit 7c366b5fc2

View File

@@ -94,6 +94,7 @@ CHECKTEMP(){
fi
done
if [ "${sensorsqry}" != "" ]; then
echo "SQ - ${sensorqry} - ${sq}"
declare -A RANGE_TEMPS
for R in ${PW_TEMPIND_RANGE[@]}; do
lookup=($(${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 ${sq}"))