From 5bf81ce26ea38b602aae90216eb40a29925e6f7e Mon Sep 17 00:00:00 2001 From: mnijman Date: Sun, 1 Mar 2026 17:42:49 +0100 Subject: [PATCH] ProposedFix down+up instead of stop+up (#266) Co-authored-by: Marc Nijman --- dockcheck.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockcheck.sh b/dockcheck.sh index 191983e..c7acfef 100755 --- a/dockcheck.sh +++ b/dockcheck.sh @@ -664,7 +664,7 @@ if [[ -n "${GotUpdates:-}" ]]; then ContRestartStack=$($jqbin -r '."mag37.dockcheck.restart-stack"' <<< "$ContLabels") [[ "$ContRestartStack" == "null" ]] && ContRestartStack="" ContOnlySpecific=$($jqbin -r '."mag37.dockcheck.only-specific-container"' <<< "$ContLabels") - [[ "$ContOnlySpecific" == "null" ]] && ContRestartStack="" + [[ "$ContOnlySpecific" == "null" ]] && ContOnlySpecific="" ContStateRunning=$($jqbin -r '."State"."Running"' <<< "$ContConfig") [[ "$ContStateRunning" == "null" ]] && ContStateRunning="" @@ -694,7 +694,7 @@ if [[ -n "${GotUpdates:-}" ]]; then # Check if the whole stack should be restarted if [[ "$ContRestartStack" == true ]] || [[ "$ForceRestartStacks" == true ]]; then - ${DockerBin} ${CompleteConfs} stop; ${DockerBin} ${CompleteConfs} ${ContEnvs} up -d || { printf "\n%bDocker error, exiting!%b\n" "$c_red" "$c_reset" ; exit 1; } + ${DockerBin} ${CompleteConfs} down; ${DockerBin} ${CompleteConfs} ${ContEnvs} up -d || { printf "\n%bDocker error, exiting!%b\n" "$c_red" "$c_reset" ; exit 1; } else ${DockerBin} ${CompleteConfs} ${ContEnvs} up -d ${SpecificContainer} || { printf "\n%bDocker error, exiting!%b\n" "$c_red" "$c_reset" ; exit 1; } fi