Update powerwall.sh
This commit is contained in:
@@ -168,7 +168,7 @@ NORMAL TEMP: ${temp_f}'F"
|
|||||||
last_temp[${SENSOR}]=1
|
last_temp[${SENSOR}]=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f ${TMPFOLDER}/${SENSOR}.insert ] && errtime=$(expr `date +%s` - $(stat -c %Y ${TMPFOLDER}/${SENSOR}.insert)) || errtime=0
|
[ -f ${TMPFOLDER}/${SENSOR}.insert ] && errtime=$(expr `date +%s` - $(stat -c %Y ${TMPFOLDER}/${SENSOR}.insert)) || errtime=100000
|
||||||
if [ ${errtime} -ge 300 ]; then
|
if [ ${errtime} -ge 300 ]; then
|
||||||
if [ "${temp_h}" != "" ]; then
|
if [ "${temp_h}" != "" ]; then
|
||||||
QRY="USE servermonitor; INSERT INTO sensor_data (\`sensorid\`, \`date\`, \`temp\`, \`hum\`) VALUES ('${SENSOR_ID[${SENSOR}]}','${datetime}','${temp_f}','${temp_h}')"
|
QRY="USE servermonitor; INSERT INTO sensor_data (\`sensorid\`, \`date\`, \`temp\`, \`hum\`) VALUES ('${SENSOR_ID[${SENSOR}]}','${datetime}','${temp_f}','${temp_h}')"
|
||||||
|
|||||||
Reference in New Issue
Block a user