mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-14 14:32:54 +00:00
shebang updated, hardcoded test variables removed, _subject being sent as title
This commit is contained in:
parent
ef33d306ae
commit
6f33f61838
@ -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
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user