Skip to content

Instantly share code, notes, and snippets.

@getsueineko
Forked from outadoc/pushover
Created July 27, 2021 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save getsueineko/400d45c1bc101da145443a7ce4d11dab to your computer and use it in GitHub Desktop.
Save getsueineko/400d45c1bc101da145443a7ce4d11dab to your computer and use it in GitHub Desktop.
Pushover Bash Script
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: ./pushover <message> [title]"
exit
fi
MESSAGE=$1
TITLE=$2
if [ $# -lt 2 ]; then
TITLE="`whoami`@${HOSTNAME}"
fi
APP_TOKEN="YOUR_TOKEN_HERE"
USER_TOKEN="YOUR_USER_ID_HERE"
wget https://api.pushover.net/1/messages.json --post-data="token=$APP_TOKEN&user=$USER_TOKEN&message=$MESSAGE&title=$TITLE" -qO- > /dev/null 2>&1 &

Pushover bash script

This is a bash script that will allow you to send a Pushover message very easily from a script or terminal.

Usage

Just put the script somewhere, and call it this way:

> ./pushover <message> [title]

So, for example:

> ./pushover "This is a test message from my Raspberry Pi."
> ./pushover "This is another message." "Wow, dude, nice title"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment