tail -f
в Telegram не транслируется.#!/bin/bash
TG_BOT_ID=AAAABBBBCCCCDDDD
TG_CHAT_ID=00001111
while read LINE; do
curl -s -X POST https://api.telegram.org/bot$TG_BOT_ID/sendMessage -d chat_id=$TG_CHAT_ID -d text="$LINE"
done
tail -f -n 1 /var/log/messages | ./tgsendmsg.sh