diff options
author | heqnx <root@heqnx.com> | 2025-06-04 00:52:11 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-06-04 00:52:11 +0300 |
commit | d8146f34f6e8adf68f9994bee243186fae70f028 (patch) | |
tree | b01cf61913b2283c711802858d2885d069f5b228 /setup-command-canaries.sh | |
parent | a8c456075d6bd82b82bad23b3ed935c81b7a50d8 (diff) | |
download | gists-d8146f34f6e8adf68f9994bee243186fae70f028.tar.gz gists-d8146f34f6e8adf68f9994bee243186fae70f028.zip |
Diffstat (limited to 'setup-command-canaries.sh')
-rw-r--r-- | setup-command-canaries.sh | 4 |
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 |