Created
December 15, 2017 09:03
-
-
Save josejuansanchez/f95aabbaeeded2780daa5ba392b5ee31 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
| # Credenciales de Telegram | |
| TOKEN="" | |
| CHATID="" | |
| # API de Telegram | |
| URL="https://api.telegram.org/bot$TOKEN/sendMessage" | |
| # Texto de la notificación | |
| DATE=$(date +"%d-%b-%Y") | |
| TEXT="Backup realizado $DATE" | |
| # Hacemos una petición HTTP GET a la API de Telegram | |
| curl -d "chat_id=$CHATID&disable_web_page_preview=1&text=$TEXT" $URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment