From 6f33f61838a43e25594eda5e5436c669314babab Mon Sep 17 00:00:00 2001 From: Daniel Kearns Date: Wed, 12 Jun 2019 14:16:37 +0100 Subject: [PATCH] shebang updated, hardcoded test variables removed, _subject being sent as title --- notify/pushover.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/notify/pushover.sh b/notify/pushover.sh index 16258830..4db3ca7a 100644 --- a/notify/pushover.sh +++ b/notify/pushover.sh @@ -1,11 +1,8 @@ -#!/bin/bash +#!/usr/bin/env sh #Support PUSHOVER.com api -#PUSHOVER_TOKEN="" # Your Pushover Application Token -#PUSHOVER_USER="" # Your Pushover UserKey PUSHOVER_URI="https://api.pushover.net/1/messages.json" -PUSHOVER_SOUND="intermission" # https://pushover.net/api#sounds pushover_send() { _subject="$1" @@ -37,7 +34,7 @@ pushover_send() { _H1="Content-Type: application/json" - _data="{\"token\": \"$PUSHOVER_TOKEN\",\"user\": \"$PUSHOVER_USER\",\"message\": \"$_content\",\"sound\": \"$PUSHOVER_SOUND\"}" + _data="{\"token\": \"$PUSHOVER_TOKEN\",\"user\": \"$PUSHOVER_USER\",\"title\": \"$_subject\",\"message\": \"$_content\",\"sound\": \"$PUSHOVER_SOUND\"}" response="" #just make shellcheck happy if _post "$_data" "$PUSHOVER_URI"; then @@ -51,4 +48,3 @@ pushover_send() { return 1 } -