You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
307 B
16 lines
307 B
2 years ago
|
#!/usr/bin/env bash
|
||
|
# Autor: Nils Gerstner
|
||
|
|
||
|
URL="https://hooks.slack.com/services/TOKENKEY"
|
||
|
username="$1"
|
||
|
message=$2
|
||
|
ICON=":ghost:"
|
||
|
|
||
|
payload="{
|
||
|
\"username\": \"${username}\",
|
||
|
\"text\": \"$message\",
|
||
|
\"icon_emoji\": \"${ICON}\"
|
||
|
}"
|
||
|
|
||
|
curl -X POST -H "Content-Type: application/json" -d "${payload}" $URL
|