From 15ce226a0a612e4bf5e5e776e2c8977dd42fbffd Mon Sep 17 00:00:00 2001 From: mag37 Date: Wed, 22 Jan 2025 16:07:50 +0100 Subject: [PATCH 1/3] changed local image check to reference ID instead of image-name --- dockcheck.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dockcheck.sh b/dockcheck.sh index 7ab7280..a09c7ae 100755 --- a/dockcheck.sh +++ b/dockcheck.sh @@ -284,8 +284,9 @@ for i in $(docker ps $Stopped --filter "name=$SearchName" --format '{{.Names}}') progress_bar "$RegCheckQue" "$ContCount" # Looping every item over the list of excluded names and skipping for e in "${Excludes[@]}" ; do [[ "$i" == "$e" ]] && continue 2 ; done + ImageId=$(docker inspect "$i" --format='{{.Image}}') RepoUrl=$(docker inspect "$i" --format='{{.Config.Image}}') - LocalHash=$(docker image inspect "$RepoUrl" --format '{{.RepoDigests}}') + LocalHash=$(docker image inspect "$ImageId" --format '{{.RepoDigests}}') # Checking for errors while setting the variable if RegHash=$(${t_out} $regbin -v error image digest --list "$RepoUrl" 2>&1) ; then if [[ "$LocalHash" = *"$RegHash"* ]] ; then From 07ad241e9f744606778e35555aded58ee85637b5 Mon Sep 17 00:00:00 2001 From: mag37 Date: Tue, 28 Jan 2025 21:08:20 +0100 Subject: [PATCH 2/3] removed whale icon and changed redirection to still show errors --- notify_templates/notify_gotify.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notify_templates/notify_gotify.sh b/notify_templates/notify_gotify.sh index b88f597..49d07ae 100644 --- a/notify_templates/notify_gotify.sh +++ b/notify_templates/notify_gotify.sh @@ -14,7 +14,7 @@ send_notification() { # Setting the MessageTitle and MessageBody variable here. MessageTitle="${FromHost} - updates available." - printf -v MessageBody "🐋 Containers on $FromHost with updates available:\n$UpdToString" + printf -v MessageBody "Containers on $FromHost with updates available:\n$UpdToString" # Modify to fit your setup: GotifyToken="Your Gotify token here" @@ -24,6 +24,6 @@ send_notification() { -F "title=${MessageTitle}" \ -F "message=${MessageBody}" \ -F "priority=5" \ - -X POST "${GotifyUrl}" &> /dev/null + -X POST "${GotifyUrl}" 1> /dev/null } From 14872b0471b510e9bcf4e86ac9a1e4607f1d0655 Mon Sep 17 00:00:00 2001 From: mag37 Date: Tue, 28 Jan 2025 21:50:02 +0100 Subject: [PATCH 3/3] local image check changed, Gotify-template fixed, version bump --- README.md | 2 +- dockcheck.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 377b6be..e03bd32 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ ___ ## :bell: Changelog +- **v0.5.3**: Local image check changed (use imageId instead of name) and Gotify-template fixed (whale icon removed). - **v0.5.2.1**: Rewrite of dependency downloads, jq can be installed with package manager or static binary. - **v0.5.1**: DEPENDENCY WARNING: now requires **jq**. + Upstreaming changes from [sudo-kraken/podcheck](https://github.com/sudo-kraken/podcheck) - **v0.5.0**: Rewritten notify logic - all templates are adjusted and should be migrated! @@ -27,7 +28,6 @@ ___ - Added Discord notify template. - Verbosity changed of `regctl`. - **v0.4.9**: Added a function to enrich the notify-message with release note URLs. See [Release notes addon](https://github.com/mag37/dockcheck#date-release-notes-addon-to-notifications) -- **v0.4.8**: Rewrote prune logic to not prompt with options `-a|-y` or `-n`. Auto prune with `-p`. ___ diff --git a/dockcheck.sh b/dockcheck.sh index a09c7ae..4f8e066 100755 --- a/dockcheck.sh +++ b/dockcheck.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERSION="v0.5.2.1" -### ChangeNotes: DEPENDENCY REMINDER: now requires jq. UPDATE: Rewrite of dependency installer. +VERSION="v0.5.3" +### ChangeNotes: Bugfixes - local image check changed, Gotify-template fixed Github="https://github.com/mag37/dockcheck" RawUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh"