1
0
Fork 0
Browse Source

Pushover added

master
Rogier Neeleman 4 years ago
parent
commit
87a3263bf2
  1. 3
      README.md
  2. 18
      messages/pushover

3
README.md

@ -1,2 +1,3 @@ @@ -1,2 +1,3 @@
# scripts
## scripts
These are some scripts I wrote in the past. Maybe they are usefull in the future.

18
messages/pushover

@ -0,0 +1,18 @@ @@ -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 APP_TOKEN>"
USER_TOKEN="<YOUR USER_TOKEN>"
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 &
Loading…
Cancel
Save