From 732a5e69cda2676849db9bcbaa9cb95001d0c71c Mon Sep 17 00:00:00 2001 From: vorezal <37914382+vorezal@users.noreply.github.com> Date: Mon, 11 Aug 2025 15:17:01 -0400 Subject: [PATCH] Reword disable notification comment for clarity and use update_snooze for dockcheck notifications. (#221) Co-authored-by: Matthew Oleksowicz --- default.config | 4 ++-- notify_templates/notify_v2.sh | 13 ++----------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/default.config b/default.config index 3ecc4d8..47b6189 100644 --- a/default.config +++ b/default.config @@ -37,9 +37,9 @@ ## Uncomment the line below and specify the number of seconds to delay notifications to enable snooze # SNOOZE_SECONDS=86400 # -## Uncomment to not send notifications when dockcheck itself has updates. +## Uncomment and set to true to disable notifications when dockcheck itself has updates. # DISABLE_DOCKCHECK_NOTIFICATION=false -## Uncomment to not send notifications when notify scripts themselves have updates. +## Uncomment and set to true to disable notifications when notify scripts themselves have updates. # DISABLE_NOTIFY_NOTIFICATION=false # ## Apprise configuration variables. Set APPRISE_PAYLOAD to make a CLI call or set APPRISE_URL to make an API request instead. diff --git a/notify_templates/notify_v2.sh b/notify_templates/notify_v2.sh index c2d8538..a256311 100644 --- a/notify_templates/notify_v2.sh +++ b/notify_templates/notify_v2.sh @@ -1,4 +1,4 @@ -NOTIFY_V2_VERSION="v0.4" +NOTIFY_V2_VERSION="v0.5" # # If migrating from an older notify template, remove your existing notify.sh file. # Leave (or place) this file in the "notify_templates" subdirectory within the same directory as the main dockcheck.sh script. @@ -177,16 +177,7 @@ dockcheck_notification() { printf "Attempted to send notification to channel ${channel}, but the function was not found. Make sure notify_${channel}.sh is available in the ${ScriptWorkDir} directory or notify_templates subdirectory.\n" done - if [[ -n "${snooze}" ]] && [[ -f "${SnoozeFile}" ]]; then - if [[ "${NotifyError}" == "false" ]]; then - if [[ -n "${found}" ]]; then - sed -e "s/dockcheck\.sh.*/dockcheck\.sh ${CurrentEpochTime}/" "${SnoozeFile}" > "${SnoozeFile}.new" - mv "${SnoozeFile}.new" "${SnoozeFile}" - else - printf "dockcheck.sh ${CurrentEpochTime}\n" >> "${SnoozeFile}" - fi - fi - fi + [[ -n "${snooze}" ]] && [[ "${NotifyError}" == "false" ]] && update_snooze "dockcheck.sh" fi fi