diff --git a/config.sample b/config.sample index e55cd9d..ac9ef7d 100755 --- a/config.sample +++ b/config.sample @@ -153,6 +153,11 @@ PB_KEY="" # IFTTT Event Name IFTTT_EVENT="arm_event" +# Pushover API User and Application Key +# Leave User key empty or comment out to disable Pushover notifications +PO_USER_KEY="" +PO_APP_KEY="" + # Determine logfile name # use the label of the DVD/CD or else use empty.log # this is required for udev events where there is no media available diff --git a/notify.sh b/notify.sh index 5ef9e57..37516fd 100755 --- a/notify.sh +++ b/notify.sh @@ -26,5 +26,15 @@ else printf "\nIFTTT notification sent" >> "$LOG" fi +#Notification via Pushover +#Trigger onl if variable is set +if [ -z "$PO_USER_KEY" ]; then + echo "Pusover notifications not enabled" >> "$LOG" +else + echo "Sending Pushover notification" >> "$LOG" + curl -s --form-string "token=$PO_APP_KEY" --form-string "user=$PO_USER_KEY" --form-string "message=$MSG" https://api.pushover.net/1/messages.json + echo "Pushover notification sent" >> "$LOG" +fi + } >> "$LOG"