diff --git a/powerwall.sh b/powerwall.sh index 1a80bc22..8079294a 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -55,7 +55,7 @@ CHECKTEMP_SERVICE(){ #echo "WARNING TEMP: $temp_f°F" | mail -s "${1} TEMP WARNING" $email_alert echo "($temp_d @ $temp_t) WARNING: $temp_f°F" - QRY="USE servermonitor; INSERT INTO sensor_data (\`sensorid\`, \`date\`, \`temp\`) VALUES ('${SENSOR_ID['$1']}','${temp_d} ${temp_t}','${temp_f}'" + QRY="USE servermonitor; INSERT INTO sensor_data (\`sensorid\`, \`date\`, \`temp\`) VALUES ('${SENSOR_ID[$1]}','${temp_d} ${temp_t}','${temp_f}'" mysql_conn -e "${QRY}" elif [ $(bc -l <<< "$temp_f >= $temp_crit") -eq 1 ]; then