mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-15 15:58:13 +01:00
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:
parent
9156cc44e1
commit
732a5e69cd
2 changed files with 4 additions and 13 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue