Skip to content

Instantly share code, notes, and snippets.

@Und3rf10w
Last active March 2, 2016 19:22
Show Gist options
  • Save Und3rf10w/1f96ce0f606207cbf997 to your computer and use it in GitHub Desktop.
Save Und3rf10w/1f96ce0f606207cbf997 to your computer and use it in GitHub Desktop.
# Pushover setup,
# Run with 'pushover $MSG'
# Example: $ pushover "this is a test notification"
# Can be piped to as well
# Example: $ echo "this is also a test" | pushover
#!/bin/bash
if [[ $# -gt 0 ]]; then
a=$@
else
read a;
fi
pushover () {
curl -s -F "token=$1" -F "user=$2" -F "title=$3" -F "message=$a" https://api.pushover.net/1/messages.json
}
# sample pushover user config
# pushover <app_token> <user_token> <app_title> "$a" #sample_username1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment