Reword disable notification comment for clarity and use update_snooze for dockcheck notifications. (#221)

Co-authored-by: Matthew Oleksowicz <matt@everyoneneeds.it>
This commit is contained in:
vorezal 2025-08-11 15:17:01 -04:00 committed by GitHub
parent 9156cc44e1
commit 732a5e69cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 13 deletions

View file

@ -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.

View file

@ -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