mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-19 02:47:45 +00:00
ntfy notification bug fixes (#197)
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
## All commented values are examples only. Modify as needed.
|
## All commented values are examples only. Modify as needed.
|
||||||
##
|
##
|
||||||
## Uncomment the line below and specify the notification channels you wish to enable in a space separated string
|
## Uncomment the line below and specify the notification channels you wish to enable in a space separated string
|
||||||
# NOTIFY_CHANNELS="apprise discord DSM generic gotify matrix ntfy-sh pushbullet pushover slack smtp telegram"
|
# NOTIFY_CHANNELS="apprise discord DSM generic gotify matrix ntfy pushbullet pushover slack smtp telegram"
|
||||||
#
|
#
|
||||||
## Uncomment to not send notifications when dockcheck itself has updates.
|
## Uncomment to not send notifications when dockcheck itself has updates.
|
||||||
# DISABLE_DOCKCHECK_NOTIFICATION=false
|
# DISABLE_DOCKCHECK_NOTIFICATION=false
|
||||||
|
|||||||
@@ -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_NTFYSH_VERSION="v0.4"
|
NOTIFY_NTFY_VERSION="v0.4"
|
||||||
#
|
#
|
||||||
# Setup app and subscription at https://ntfy.sh
|
# Setup app and subscription at https://ntfy.sh
|
||||||
# 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.
|
||||||
@@ -7,12 +7,12 @@ NOTIFY_NTFYSH_VERSION="v0.4"
|
|||||||
# Do not modify this file directly within the "notify_templates" subdirectory. Set NTFY_DOMAIN and NTFY_TOPIC_NAME in your dockcheck.config file.
|
# Do not modify this file directly within the "notify_templates" subdirectory. Set NTFY_DOMAIN and NTFY_TOPIC_NAME in your dockcheck.config file.
|
||||||
|
|
||||||
if [[ -z "${NTFY_DOMAIN:-}" ]] || [[ -z "${NTFY_TOPIC_NAME:-}" ]]; then
|
if [[ -z "${NTFY_DOMAIN:-}" ]] || [[ -z "${NTFY_TOPIC_NAME:-}" ]]; then
|
||||||
printf "Ntfy.sh notification channel enabled, but required configuration variables are missing. Ntfy.sh notifications will not be sent.\n"
|
printf "Ntfy notification channel enabled, but required configuration variables are missing. Ntfy notifications will not be sent.\n"
|
||||||
|
|
||||||
remove_channel ntfy-sh
|
remove_channel ntfy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trigger_ntfy-sh_notification() {
|
trigger_ntfy_notification() {
|
||||||
NtfyUrl="${NTFY_DOMAIN}/${NTFY_TOPIC_NAME}"
|
NtfyUrl="${NTFY_DOMAIN}/${NTFY_TOPIC_NAME}"
|
||||||
# e.g.
|
# e.g.
|
||||||
# NTFY_DOMAIN=ntfy.sh
|
# NTFY_DOMAIN=ntfy.sh
|
||||||
Reference in New Issue
Block a user