Skip to content

Instantly share code, notes, and snippets.

@timebotdon
timebotdon / telegram_log_sender.sh
Last active February 5, 2020 01:32
Simple shell script to forward logs to a Telegram bot.
#!/bin/bash
## Credit: admin@Shellhacks
## Article URL: https://www.shellhacks.com/telegram-api-send-message-personal-notification-bot/
## Define Vars
token= #Telegram bot API token
chatID= #Telegram Chat ID
sendURL="https://api.telegram.org/bot$token/sendMessage"
logFile="/var/log/auth.log"