Skip to content

Instantly share code, notes, and snippets.

@bonelifer
Forked from henri/pushover.sh
Created July 22, 2020 01:48
Show Gist options
  • Save bonelifer/d850766c6249ae6bf3b5e93df981b1f8 to your computer and use it in GitHub Desktop.
Save bonelifer/d850766c6249ae6bf3b5e93df981b1f8 to your computer and use it in GitHub Desktop.
PushOver
#! /bin/bash
#
# RELEASED UNDER MIT LICENCE : https://mit-license.org
# Copyright Allrights Reserved 2020, Henri Shustak
# This Script Works With the PushOver <http://pushover.net> service and is capable of sending notifcations to your phone.
#
# Usage: ./pushover.bash message title url url_title priority device'
#
# Example: ./pushover.sh "this is a test" "test title" "http://mylink.com" "my url title" 0 "iPhone"'
# Note: All parameters except message are optional'
#
#
# Descriptin : This PushOver script will allow devies to send messages out via PushOver API.
# Just copy the script, make it executable chmod -x and then finally, run it with some perameters.
#
# configuration
app="APPNAME" # you can set this to something else that makes sense if you like
userkey=YOUR_TOKEN_HERE # Look at https://pushover.net/ to find your user key
apikey=YOUR_TOKEN_HERE # Replace YOURAPIKEY with your key
message=${1}
title=${2}
url=${3}
url_title=${4}
priority=${5}
device=${6}
if [ $# -lt 1 ]; then
echo 'pushover.sh'
echo 'Usage: ./pushover.sh message title url url_title priority device'
echo 'Example: ./pushover.sh "this is a test" "test title" "http://myurl.com" "URL Title" 0 "iPad"'
echo ' note : all parameters except message are optional'
else
curl https://api.pushover.net/1/messages.json -F token=$apikey -F user=$userkey -F message="$message" -F title="$title" -F url="$url" -F url$
fi
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment