Created
January 2, 2020 22:33
-
-
Save VTimofeenko/bb2725beb6f321c4c065055deca8bacd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# A _very_ primitive telegram notification mechanism | |
# If you want something more sophisticated - check https://github.com/vysheng/tg | |
if [ -z "${1}" ] | |
then | |
message_text="Job's done!" | |
else | |
message_text=${1} | |
fi | |
curl -X POST \ | |
-H 'Content-Type: application/json' \ | |
-d "{\"chat_id\": \"${CHAT_ID}\", \"text\": \"${message_text}\", \"disable_notification\": true}" \ | |
https://api.telegram.org/bot${BOT_ID}:${BOT_KEY}/sendMessage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment