Skip to content

Instantly share code, notes, and snippets.

@r-darwish
Created February 23, 2018 10:38
Show Gist options
  • Save r-darwish/b5072d83cfec927ea57cac0c12ec6d64 to your computer and use it in GitHub Desktop.
Save r-darwish/b5072d83cfec927ea57cac0c12ec6d64 to your computer and use it in GitHub Desktop.
Telegram Boot notificaion
[Unit]
Description=Notify via Telegram that the system finished booting
Requires=network-online.target
After=network-online.target
StartLimitInterval=20
StartLimitBurst=4
[Service]
ExecStart=/usr/bin/curl --data chat_id=xxxxxxx --data-urlencode "text=xxxx Booted" "https://api.telegram.org/botxxxx:xxxxxxxxx/sendMessage"
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment