You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
375 B
18 lines
375 B
#!/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 &
|
|
|