Created
January 27, 2023 06:28
-
-
Save drushadrusha/1bddbb8dc60c76d04532dd26dc9aca6e to your computer and use it in GitHub Desktop.
systemd service notifications in telegram without fucking python scripts and other trash
This file contains 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
ExecStartPost=/bin/bash -c "SERVICE_NAME=%n;curl \"https://api.telegram.org/botTOKEN/sendMessage?chat_id=20515652&text=✅ Service $SERVICE_NAME started on $HOSTNAME\"" | |
ExecStopPost=/bin/bash -c "SERVICE_NAME=%n;curl \"https://api.telegram.org/botTOKEN/sendMessage?chat_id=20515652&text=❌ Service $SERVICE_NAME stopped on $HOSTNAME\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment