Replace tgram://bottoken/ChatID
to your tg bot.
Created
January 2, 2024 13:55
-
-
Save douo/67e5e8c9508eca14f34b0357c90fed74 to your computer and use it in GitHub Desktop.
Journald Telegram Notifier
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
[Unit] | |
Description=Journald Telegram Notifier | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/bin/sh -c 'journalctl -b -f -p "2..3" -t kernel | awk -F ": " "{ st = index(\$0,\\\": \\\"); system(\\\"apprise tgram://bottoken/ChatID -vv -t \\\\\\\"\\\" \$1 \\\"\\\\\\\" -b \\\\\\\"\\\" substr(\$0,st+2) \\\"\\\\\\\"\\\")}"' | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment