Created
July 9, 2017 01:20
-
-
Save Dimtree/67825b4100835ce361b51f1a62daf999 to your computer and use it in GitHub Desktop.
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
#!/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