Skip to content

Instantly share code, notes, and snippets.

@Dimtree
Created July 9, 2017 01:20
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 Dimtree/67825b4100835ce361b51f1a62daf999 to your computer and use it in GitHub Desktop.
Save Dimtree/67825b4100835ce361b51f1a62daf999 to your computer and use it in GitHub Desktop.
#!/bin/bash
APP_TOKEN="your_token_here"
USER_TOKEN="your_token_here"
if [ $# -eq 0 ]; then
echo "Usage: ./pushover <message> [title]"
exit
fi
MESSAGE=$1
TITLE=$2
if [ $# -lt 2 ]; then
TITLE="$(whoami)@${HOSTNAME}"
fi
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 &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment