We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 34ea97d + f1dc79f commit fc5e593Copy full SHA for fc5e593
notify/ntfy.sh
@@ -4,6 +4,7 @@
4
5
#NTFY_URL="https://ntfy.sh"
6
#NTFY_TOPIC="xxxxxxxxxxxxx"
7
+#NTFY_TOKEN="xxxxxxxxxxxxx"
8
9
ntfy_send() {
10
_subject="$1"
@@ -23,6 +24,12 @@ ntfy_send() {
23
24
_saveaccountconf_mutable NTFY_TOPIC "$NTFY_TOPIC"
25
fi
26
27
+ NTFY_TOKEN="${NTFY_TOKEN:-$(_readaccountconf_mutable NTFY_TOKEN)}"
28
+ if [ "$NTFY_TOKEN" ]; then
29
+ _saveaccountconf_mutable NTFY_TOKEN "$NTFY_TOKEN"
30
+ export _H1="Authorization: Bearer $NTFY_TOKEN"
31
+ fi
32
+
33
_data="${_subject}. $_content"
34
response="$(_post "$_data" "$NTFY_URL/$NTFY_TOPIC" "" "POST" "")"
35
0 commit comments