From d8146f34f6e8adf68f9994bee243186fae70f028 Mon Sep 17 00:00:00 2001 From: heqnx Date: Wed, 4 Jun 2025 00:52:11 +0300 Subject: added user --- setup-command-canaries.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup-command-canaries.sh b/setup-command-canaries.sh index 60324bd..78b0e04 100644 --- a/setup-command-canaries.sh +++ b/setup-command-canaries.sh @@ -94,13 +94,13 @@ case "${service}" in discord) webhook_url="${webhook_url:-}" webhook_headers+=("Content-Type: application/json") - webhook_data="{\"username\":\"notifications-bot\", \"content\":\"**Command Canary Triggered**\nHostname: \${HOSTNAME}\nCommand: \${FUNCNAME[0]}\nTime: \$(date -u --iso-8601=seconds)\"}" + webhook_data="{\"username\":\"notifications-bot\", \"content\":\"**Command Canary Triggered**\nUser: \${USER}\nHostname: \${HOSTNAME}\nCommand: \${FUNCNAME[0]}\nTime: \$(date -u --iso-8601=seconds)\"}" ;; slack) webhook_headers+=("Content-Type: application/json") ! test "${channel}" || { printf "%s\n" "[err] slack requires a channel (-t)"; exit 1; } - webhook_data="{\"text\":\"**Command Canary Triggered**\\nHostname: \${HOSTNAME}\\nCommand: \${FUNCNAME[0]}\\nTime: \$(date -u --iso-8601=seconds)\",\"channel\":\"${channel}\"}" + webhook_data="{\"text\":\"**Command Canary Triggered**\nUser: \${USER}\nHostname: \${HOSTNAME}\nCommand: \${FUNCNAME[0]}\nTime: \$(date -u --iso-8601=seconds)\",\"channel\":\"${channel}\"}" ;; *) usage -- cgit v1.2.3