diff --git a/dockcheck.sh b/dockcheck.sh index 77ad27f..14c5c1f 100755 --- a/dockcheck.sh +++ b/dockcheck.sh @@ -148,6 +148,17 @@ progress_bar() { [[ "$QueTotal" == "$QueCurrent" ]] && printf "\r[%b%s%b] %s/%s \n" "$c_teal" "$BarComplete" "$c_reset" "$QueCurrent" "$QueTotal" } +### Function to add user-provided urls to releasenotes +releasenotes() { + for update in ${Updates[@]}; do + found=false + while read -r container url; do + [[ $update == $container ]] && printf "%s -> %s\n" "$update" "$url" && found=true + done < "$ScriptWorkDir"/urls.list + [[ $found == false ]] && printf "%s -> no url in list\n" "$update" + done +} + ### Version check & initiate self update if [[ "$VERSION" != "$LatestRelease" ]] ; then printf "New version available! %b%s%b ⇒ %b%s%b \n Change Notes: %s \n" "$c_yellow" "$VERSION" "$c_reset" "$c_green" "$LatestRelease" "$c_reset" "$LatestChanges" diff --git a/notify_templates/notify_generic.sh b/notify_templates/notify_generic.sh index 04b508c..9ff6226 100644 --- a/notify_templates/notify_generic.sh +++ b/notify_templates/notify_generic.sh @@ -5,7 +5,7 @@ send_notification() { Updates=("$@") - UpdToString=$( printf "%s\n" "${Updates[@]}" ) + [ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" ) FromHost=$(hostname) # platform specific notification code would go here diff --git a/notify_templates/urls.list b/notify_templates/urls.list index c8faef1..e131872 100644 --- a/notify_templates/urls.list +++ b/notify_templates/urls.list @@ -1,3 +1,7 @@ +# This is a list of container names and releasenote urls, separated by space. +# Modify, add and (if necessary) remove to fit your needs. +# Additions are welcome! Append your list to the git-repo, use generic names and sensible urls. + apprise-api https://github.com/linuxserver/docker-apprise-api/releases homer https://github.com/bastienwirtz/homer/releases nginx https://github.com/docker-library/official-images/blob/master/library/nginx