From 49c87aecc43b671c666387e17b1a4d9b8b4be561 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 5 Dec 2025 15:37:51 +0100 Subject: [PATCH] Update tools.func --- misc/tools.func | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 4e96d770a..4f1d6a4de 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -4805,7 +4805,6 @@ function setup_docker() { # Cleanup old repository configurations if [ -f /etc/apt/sources.list.d/docker.list ]; then - msg_info "Migrating from old Docker repository format" rm -f /etc/apt/sources.list.d/docker.list rm -f /etc/apt/keyrings/docker.asc fi @@ -4819,6 +4818,7 @@ function setup_docker() { "$(get_os_info codename)" \ "stable" \ "$(dpkg --print-architecture)" + msg_ok "Set up Docker Repository" # Install or upgrade Docker if [ "$docker_installed" = true ]; then @@ -4826,7 +4826,8 @@ function setup_docker() { DOCKER_LATEST_VERSION=$(apt-cache policy docker-ce | grep Candidate | awk '{print $2}' | cut -d':' -f2 | cut -d'-' -f1) if [ "$DOCKER_CURRENT_VERSION" != "$DOCKER_LATEST_VERSION" ]; then - msg_info "Updating Docker $DOCKER_CURRENT_VERSION → $DOCKER_LATEST_VERSION" + msg_ok "Docker update available ($DOCKER_CURRENT_VERSION → $DOCKER_LATEST_VERSION)" + msg_info "Updating Docker" $STD apt install -y --only-upgrade \ docker-ce \ docker-ce-cli \ @@ -4872,7 +4873,8 @@ EOF PORTAINER_LATEST=$(curl -fsSL https://registry.hub.docker.com/v2/repositories/portainer/portainer-ce/tags?page_size=100 | grep -oP '"name":"\K[0-9]+\.[0-9]+\.[0-9]+"' | head -1 | tr -d '"') if [ "$PORTAINER_CURRENT" != "$PORTAINER_LATEST" ]; then - read -r -p "${TAB3}Update Portainer $PORTAINER_CURRENT → $PORTAINER_LATEST? " prompt + msg_ok "Portainer update available ($PORTAINER_CURRENT → $PORTAINER_LATEST)" + read -r -p "${TAB3}Update Portainer? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Updating Portainer" docker stop portainer @@ -4887,6 +4889,8 @@ EOF -v portainer_data:/data \ portainer/portainer-ce:latest msg_ok "Updated Portainer to $PORTAINER_LATEST" + else + msg_ok "Skipped Portainer update" fi else msg_ok "Portainer is up-to-date ($PORTAINER_CURRENT)" @@ -4934,6 +4938,7 @@ EOF done < <(docker ps --format '{{.Names}} {{.Image}}') if [ ${#containers_with_updates[@]} -gt 0 ]; then + msg_ok "Found ${#containers_with_updates[@]} container(s) with updates" echo "" echo "${TAB3}Container updates available:" for info in "${container_info[@]}"; do @@ -4962,6 +4967,8 @@ EOF msg_ok "Stopped and removed $container (please recreate with updated image)" fi done + else + msg_ok "Skipped container updates" fi else msg_ok "All containers are up-to-date"