Last active
October 24, 2024 12:31
-
-
Save outadoc/848c74677b93dbe2e8f4 to your computer and use it in GitHub Desktop.
Revisions
-
outadoc renamed this gist
Aug 24, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
outadoc created this gist
May 3, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ # Pushover bash script This is a bash script that will allow you to send a [Pushover](http://pushover.net) 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" 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #!/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 &