mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-02 05:47:20 +02:00
added tag-support to Apprise API-call
This commit is contained in:
parent
ca787d7754
commit
5a745b2b4e
2 changed files with 4 additions and 8 deletions
|
|
@ -51,6 +51,7 @@
|
|||
# pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b
|
||||
# tgram://{bot_token}/{chat_id}/'
|
||||
# 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"
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
### 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.
|
||||
# Leave (or place) this file in the "notify_templates" subdirectory within the same directory as the main dockcheck.sh script.
|
||||
|
|
@ -35,17 +35,12 @@ trigger_apprise_notification() {
|
|||
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
|
||||
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
|
||||
NotifyError=true
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue