Created
December 9, 2023 10:10
-
-
Save Kerollmops/a305552d7cfddc01625cfd065478e1f6 to your computer and use it in GitHub Desktop.
A very simple bash/shell function to push messages through pushover
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
# Create an API KEY there: https://pushover.net/apps/build | |
# Find your user TOKEN here: https://pushover.net | |
# | |
# Note that the `title` field is optional and don't forget to put double quotes | |
# around your argument when calling this function. | |
# | |
# Here is a small example of pipping logs through pushover: | |
# | |
# nohup tail -f nohup.out | while read l; do pushover "$l"; done & | |
# | |
function pushover { | |
curl -s -F "token=YOUR_TOKEN_HERE" \ | |
-F "user=YOUR_USER_KEY_HERE" \ | |
-F "title=YOUR_TITLE_HERE" \ | |
-F "message=$1" https://api.pushover.net/1/messages.json | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment