mirror of
https://github.com/mag37/dockcheck.git
synced 2026-03-02 15:10:32 +01:00
ProposedFix down+up instead of stop+up (#266)
Co-authored-by: Marc Nijman <git@marcnijman.nl>
This commit is contained in:
parent
5cef6c20ff
commit
5bf81ce26e
1 changed files with 2 additions and 2 deletions
|
|
@ -664,7 +664,7 @@ if [[ -n "${GotUpdates:-}" ]]; then
|
||||||
ContRestartStack=$($jqbin -r '."mag37.dockcheck.restart-stack"' <<< "$ContLabels")
|
ContRestartStack=$($jqbin -r '."mag37.dockcheck.restart-stack"' <<< "$ContLabels")
|
||||||
[[ "$ContRestartStack" == "null" ]] && ContRestartStack=""
|
[[ "$ContRestartStack" == "null" ]] && ContRestartStack=""
|
||||||
ContOnlySpecific=$($jqbin -r '."mag37.dockcheck.only-specific-container"' <<< "$ContLabels")
|
ContOnlySpecific=$($jqbin -r '."mag37.dockcheck.only-specific-container"' <<< "$ContLabels")
|
||||||
[[ "$ContOnlySpecific" == "null" ]] && ContRestartStack=""
|
[[ "$ContOnlySpecific" == "null" ]] && ContOnlySpecific=""
|
||||||
ContStateRunning=$($jqbin -r '."State"."Running"' <<< "$ContConfig")
|
ContStateRunning=$($jqbin -r '."State"."Running"' <<< "$ContConfig")
|
||||||
[[ "$ContStateRunning" == "null" ]] && ContStateRunning=""
|
[[ "$ContStateRunning" == "null" ]] && ContStateRunning=""
|
||||||
|
|
||||||
|
|
@ -694,7 +694,7 @@ if [[ -n "${GotUpdates:-}" ]]; then
|
||||||
|
|
||||||
# Check if the whole stack should be restarted
|
# Check if the whole stack should be restarted
|
||||||
if [[ "$ContRestartStack" == true ]] || [[ "$ForceRestartStacks" == true ]]; then
|
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
|
else
|
||||||
${DockerBin} ${CompleteConfs} ${ContEnvs} up -d ${SpecificContainer} || { printf "\n%bDocker error, exiting!%b\n" "$c_red" "$c_reset" ; exit 1; }
|
${DockerBin} ${CompleteConfs} ${ContEnvs} up -d ${SpecificContainer} || { printf "\n%bDocker error, exiting!%b\n" "$c_red" "$c_reset" ; exit 1; }
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue