mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-19 02:47:45 +00:00
added tag-support to Apprise API-call
This commit is contained in:
@@ -51,6 +51,7 @@
|
|||||||
# pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b
|
# pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b
|
||||||
# tgram://{bot_token}/{chat_id}/'
|
# tgram://{bot_token}/{chat_id}/'
|
||||||
# APPRISE_URL="http://apprise.mydomain.tld:1234/notify/apprise"
|
# APPRISE_URL="http://apprise.mydomain.tld:1234/notify/apprise"
|
||||||
|
# APPRISE_TAG="one_tag,othertag" # Only works with the URL API and need to setup tags within Apprise
|
||||||
#
|
#
|
||||||
# BARK_KEY="key-value"
|
# BARK_KEY="key-value"
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||||
NOTIFY_APPRISE_VERSION="v0.4"
|
NOTIFY_APPRISE_VERSION="v0.5"
|
||||||
#
|
#
|
||||||
# Required receiving services must already be set up.
|
# Required receiving services must already be set up.
|
||||||
# Leave (or place) this file in the "notify_templates" subdirectory within the same directory as the main dockcheck.sh script.
|
# Leave (or place) this file in the "notify_templates" subdirectory within the same directory as the main dockcheck.sh script.
|
||||||
@@ -35,14 +35,9 @@ trigger_apprise_notification() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# e.g. APPRISE_PAYLOAD='mailto://myemail:mypass@gmail.com
|
|
||||||
# mastodons://{token}@{host}
|
|
||||||
# pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b
|
|
||||||
# tgram://{bot_token}/{chat_id}/'
|
|
||||||
|
|
||||||
if [[ -n "${!AppriseUrlVar:-}" ]]; then
|
if [[ -n "${!AppriseUrlVar:-}" ]]; then
|
||||||
AppriseURL="${!AppriseUrlVar}"
|
AppriseURL="${!AppriseUrlVar}"
|
||||||
curl -S -o /dev/null ${CurlArgs} -X POST -F "title=$MessageTitle" -F "body=$MessageBody" -F "tags=all" $AppriseURL # e.g. APPRISE_URL=http://apprise.mydomain.tld:1234/notify/apprise
|
curl -S -o /dev/null ${CurlArgs} -X POST -F "title=$MessageTitle" -F "body=$MessageBody" -F "tags=${APPRISE_TAG:-all}" "$AppriseURL"
|
||||||
|
|
||||||
if [[ $? -gt 0 ]]; then
|
if [[ $? -gt 0 ]]; then
|
||||||
NotifyError=true
|
NotifyError=true
|
||||||
|
|||||||
Reference in New Issue
Block a user