Update temp.inc.sh
This commit is contained in:
@@ -552,10 +552,10 @@ CHECKTEMP(){
|
||||
spc_cnt=7
|
||||
[ "${mysql_conn}" != "" ] && OLD_temp_f=($(${mysql_conn} -e "SELECT temp,date FROM servermonitor.sensor_data WHERE sensorid='${PW_SENSOR_ID[${SENSOR}]}' AND entity=${entityid[1]} AND date >= DATE_SUB(NOW(), INTERVAL $(expr ${M} + 1) MINUTE) AND date <= DATE_SUB(NOW(), INTERVAL $(expr ${M} - 6) MINUTE) ORDER BY date ASC LIMIT 1"))
|
||||
fi
|
||||
echo "HERE: $temp_f - ($OLD_temp_f[@])"
|
||||
OLD_temp_f=${OLD_temp_f[2]}
|
||||
OLD_date=${OLD_temp_f[3]}
|
||||
OLD_time=${OLD_temp_f[4]}
|
||||
OLD_temp_f=${OLD_temp_f[2]}
|
||||
echo "HERE: $OLD_temp_f - $OLD_date - $OLD_time"
|
||||
fi
|
||||
if [ "${OLD_temp_f}" != "" ]; then
|
||||
if [ $(bc -l <<< "${temp_f} < $(echo "scale=2; ${OLD_temp_f}+${PW_TEMPIND_DIFF}" | bc)") -eq 1 ] && [ $(bc -l <<< "$(echo "scale=2; ${OLD_temp_f}-${PW_TEMPIND_DIFF}" | bc) < ${temp_f}") -eq 1 ]; then
|
||||
|
||||
Reference in New Issue
Block a user