mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-17 01:47:45 +00: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:
@@ -37,9 +37,9 @@
|
|||||||
## Uncomment the line below and specify the number of seconds to delay notifications to enable snooze
|
## Uncomment the line below and specify the number of seconds to delay notifications to enable snooze
|
||||||
# SNOOZE_SECONDS=86400
|
# 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
|
# 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
|
# 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.
|
## 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.
|
# 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.
|
# 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"
|
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
|
done
|
||||||
|
|
||||||
if [[ -n "${snooze}" ]] && [[ -f "${SnoozeFile}" ]]; then
|
[[ -n "${snooze}" ]] && [[ "${NotifyError}" == "false" ]] && update_snooze "dockcheck.sh"
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user