Oops, copy pastad the wrong DATA variable declaration

This commit is contained in:
zebra 2024-03-19 12:34:15 -07:00
parent de53697b62
commit df9e73fd1f

View File

@ -43,7 +43,7 @@ echo "$gpu_info"
AGENTID=$(cat /etc/tacticalagent | jq -r .agentid)
URL="https://your.RMM.api.here/agents
DATA=$(echo {} | jq -n --arg LOAD "$gpu_info%" '{"custom_fields":[{"field":20,"string_value":$LOAD}]}')
DATA=$(echo {}|jq -n --arg TEMP "$gpu_temps" '{"custom_fields":[{"field":18,"string_value":$TEMP}]}')
# Make sure to declare an API key in a secure fashion.
curl -s -X PUT -H "Content-Type: application/json" -H "X-API-KEY:$API" $URL --data "$DATA" >NUL