mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-17 18:07:46 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37f33d7a06 | ||
|
|
732a5e69cd | ||
|
|
9156cc44e1 | ||
|
|
fbc9a252f5 |
@@ -22,7 +22,11 @@
|
|||||||
___
|
___
|
||||||
## :bell: Changelog
|
## :bell: Changelog
|
||||||
|
|
||||||
- **v0.6.9**: #
|
- **v0.7.0**:
|
||||||
|
- Bugfix: snooze dockcheck.sh-self-notification and some config clarification.
|
||||||
|
- Added authentication support to Ntfy.sh.
|
||||||
|
- Added suport for sendmail in the SMTP-template.
|
||||||
|
- **v0.6.9**:
|
||||||
- Bugfix: label logic didn't skip recreation (skipped pulling).
|
- Bugfix: label logic didn't skip recreation (skipped pulling).
|
||||||
- Added comma separated search filtering so you can selectively search exactly which containers to check/update.
|
- Added comma separated search filtering so you can selectively search exactly which containers to check/update.
|
||||||
- eg: `dockcheck.sh -yp homer,dozzle`
|
- eg: `dockcheck.sh -yp homer,dozzle`
|
||||||
|
|||||||
@@ -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.
|
||||||
@@ -68,6 +68,7 @@
|
|||||||
## https://ntfy.sh or your custom domain with https:// and no trailing /
|
## https://ntfy.sh or your custom domain with https:// and no trailing /
|
||||||
# NTFY_DOMAIN="https://ntfy.sh"
|
# NTFY_DOMAIN="https://ntfy.sh"
|
||||||
# NTFY_TOPIC_NAME="YourUniqueTopicName"
|
# NTFY_TOPIC_NAME="YourUniqueTopicName"
|
||||||
|
# NTFY_AUTH="" # set to either format -> "user:password" OR ":tk_12345678". If using tokens, don't forget the ":"
|
||||||
#
|
#
|
||||||
# PUSHBULLET_URL="https://api.pushbullet.com/v2/pushes"
|
# PUSHBULLET_URL="https://api.pushbullet.com/v2/pushes"
|
||||||
# PUSHBULLET_TOKEN="token-value"
|
# PUSHBULLET_TOKEN="token-value"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
VERSION="v0.6.9"
|
VERSION="v0.7.0"
|
||||||
# ChangeNotes: bugfix label logic and added comma separated search filtering
|
# ChangeNotes: Snooze bugfix, added auth support to ntfy.sh and sendmail support to SMTP
|
||||||
Github="https://github.com/mag37/dockcheck"
|
Github="https://github.com/mag37/dockcheck"
|
||||||
RawUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh"
|
RawUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh"
|
||||||
|
|
||||||
@@ -601,7 +601,7 @@ if [[ -n "${GotUpdates:-}" ]]; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ "$AutoPrune" == false ]] && [[ "$AutoMode" == false ]]; then printf "\n"; read -rep "Would you like to prune dangling images? y/[n]: " AutoPrune; fi
|
if [[ "$AutoPrune" == false ]] && [[ "$AutoMode" == false ]]; then printf "\n"; read -rep "Would you like to prune dangling images? y/[n]: " AutoPrune; fi
|
||||||
if [[ "$AutoPrune" == true ]] || [[ "$AutoPrune" =~ [yY] ]]; then printf "\n Auto pruning.."; docker image prune -f; fi
|
if [[ "$AutoPrune" == true ]] || [[ "$AutoPrune" =~ [yY] ]]; then printf "\nAuto pruning.."; docker image prune -f; fi
|
||||||
printf "\n%bAll done!%b\n" "$c_green" "$c_reset"
|
printf "\n%bAll done!%b\n" "$c_green" "$c_reset"
|
||||||
else
|
else
|
||||||
printf "\nNo updates installed, exiting.\n"
|
printf "\nNo updates installed, exiting.\n"
|
||||||
|
|||||||
@@ -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_DSM_VERSION="v0.3"
|
NOTIFY_DSM_VERSION="v0.4"
|
||||||
# INFO: ssmtp is deprecated - consider to use msmtp instead.
|
# INFO: ssmtp is deprecated - consider to use msmtp instead.
|
||||||
#
|
#
|
||||||
# mSMTP/sSMTP has to be installed and configured manually.
|
# mSMTP/sSMTP has to be installed and configured manually.
|
||||||
@@ -10,13 +10,16 @@ NOTIFY_DSM_VERSION="v0.3"
|
|||||||
|
|
||||||
MSMTP=$(which msmtp)
|
MSMTP=$(which msmtp)
|
||||||
SSMTP=$(which ssmtp)
|
SSMTP=$(which ssmtp)
|
||||||
|
SENDMAIL=$(which sendmail)
|
||||||
|
|
||||||
if [ -n "$MSMTP" ] ; then
|
if [ -n "$MSMTP" ] ; then
|
||||||
MailPkg=$MSMTP
|
MailPkg=$MSMTP
|
||||||
elif [ -n "$SSMTP" ] ; then
|
elif [ -n "$SSMTP" ] ; then
|
||||||
MailPkg=$SSMTP
|
MailPkg=$SSMTP
|
||||||
|
elif [ -n "$SENDMAIL" ] ; then
|
||||||
|
MailPkg=$SENDMAIL
|
||||||
else
|
else
|
||||||
echo "No msmtp or ssmtp binary found in PATH: $PATH" ; exit 1
|
echo "No msmtp, ssmtp or sendmail binary found in PATH: $PATH" ; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trigger_DSM_notification() {
|
trigger_DSM_notification() {
|
||||||
|
|||||||
@@ -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.5"
|
NOTIFY_NTFYSH_VERSION="v0.6"
|
||||||
#
|
#
|
||||||
# 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.
|
||||||
@@ -24,11 +24,18 @@ trigger_ntfy_notification() {
|
|||||||
ContentType="Markdown: no" #text/plain
|
ContentType="Markdown: no" #text/plain
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${NTFY_AUTH:-}" ]]; then
|
||||||
|
NtfyAuth="-u $NTFY_AUTH"
|
||||||
|
else
|
||||||
|
NtfyAuth=""
|
||||||
|
fi
|
||||||
|
|
||||||
curl -S -o /dev/null ${CurlArgs} \
|
curl -S -o /dev/null ${CurlArgs} \
|
||||||
-H "Title: $MessageTitle" \
|
-H "Title: $MessageTitle" \
|
||||||
-H "$ContentType" \
|
-H "$ContentType" \
|
||||||
-d "$MessageBody" \
|
-d "$MessageBody" \
|
||||||
"$NtfyUrl"
|
$NtfyAuth \
|
||||||
|
-L "$NtfyUrl"
|
||||||
|
|
||||||
if [[ $? -gt 0 ]]; then
|
if [[ $? -gt 0 ]]; then
|
||||||
NotifyError=true
|
NotifyError=true
|
||||||
|
|||||||
@@ -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_SMTP_VERSION="v0.3"
|
NOTIFY_SMTP_VERSION="v0.4"
|
||||||
# INFO: ssmtp is depcerated - consider to use msmtp instead.
|
# INFO: ssmtp is depcerated - consider to use msmtp instead.
|
||||||
#
|
#
|
||||||
# mSMTP/sSMTP has to be installed and configured manually.
|
# mSMTP/sSMTP has to be installed and configured manually.
|
||||||
@@ -15,13 +15,16 @@ fi
|
|||||||
|
|
||||||
MSMTP=$(which msmtp)
|
MSMTP=$(which msmtp)
|
||||||
SSMTP=$(which ssmtp)
|
SSMTP=$(which ssmtp)
|
||||||
|
SENDMAIL=$(which sendmail)
|
||||||
|
|
||||||
if [ -n "$MSMTP" ] ; then
|
if [ -n "$MSMTP" ] ; then
|
||||||
MailPkg=$MSMTP
|
MailPkg=$MSMTP
|
||||||
elif [ -n "$SSMTP" ] ; then
|
elif [ -n "$SSMTP" ] ; then
|
||||||
MailPkg=$SSMTP
|
MailPkg=$SSMTP
|
||||||
|
elif [ -n "$SENDMAIL" ] ; then
|
||||||
|
MailPkg=$SENDMAIL
|
||||||
else
|
else
|
||||||
echo "No msmtp or ssmtp binary found in PATH: $PATH" ; exit 1
|
echo "No msmtp, ssmtp or sendmail binary found in PATH: $PATH" ; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trigger_smtp_notification() {
|
trigger_smtp_notification() {
|
||||||
|
|||||||
@@ -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