aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup-command-canaries.sh4
1 files 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