Last active
May 15, 2016 09:11
-
-
Save StoneMoe/aade196c06b292952e0cc65ea0eeda0d to your computer and use it in GitHub Desktop.
Linux login telegram bot alert
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
echo "Welcome, "$(whoami) | |
login_notice_id="" # admin's telegram id | |
login_notice_username=$(whoami) | |
login_notice_token="" # telegram bot token | |
curl --silent --data "chat_id=${login_notice_id}&text=${login_notice_username}&parse_mode=HTML&disable_web_page_preview=true" -o /dev/null https://api.telegram.org/bot$(login_notice_token)/sendMessage | |
printf "\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe you wanna put this script into /etc/profile.d/scriptname.sh