fix: unquote PAYLOAD heredoc so runtime vars are expanded

The inner PAYLOAD heredoc had a quoted delimiter ('PAYLOAD') which
prevented runtime variable expansion. Changed to unquoted (PAYLOAD)
so $AGENT_KEY, $CPU, etc. are correctly expanded at runtime.

The double-escaping works as:
  install time (outer EOF):  $AGENT_KEY  →   (in file)
  runtime (inner PAYLOAD):     →  abc123... (actual value)
This commit is contained in:
2026-06-11 20:35:24 -04:00
parent a1e3723a97
commit ddf4d744c6

View File

@@ -62,7 +62,7 @@ collect_metrics() {
}
push_metrics() {
payload=\$(cat << 'PAYLOAD'
payload=\$(cat << PAYLOAD
{
"agent_key": "\$AGENT_KEY",
"cpu": \$CPU,