diff --git a/default.config b/default.config index 0db0980..6273610 100644 --- a/default.config +++ b/default.config @@ -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" # diff --git a/notify_templates/notify_apprise.sh b/notify_templates/notify_apprise.sh index d2ab0a5..3c20743 100644 --- a/notify_templates/notify_apprise.sh +++ b/notify_templates/notify_apprise.sh @@ -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 -} \ No newline at end of file +}