added to log detal for containers
This commit is contained in:
@@ -129,11 +129,14 @@ stop_containers() {
|
||||
"docker inspect -f '{{.State.Running}}' $c 2>/dev/null" || echo "false")
|
||||
|
||||
if [[ "$STATUS" == "true" ]]; then
|
||||
warn "Stopping $c"
|
||||
RUNNING_CONTAINERS+=("$c")
|
||||
ssh -i "$SSH_KEY" root@"$REMOTE_SERVER" "docker stop $c" >/dev/null
|
||||
else
|
||||
log "$c already stopped"
|
||||
warn "Stopping $c"
|
||||
RUNNING_CONTAINERS+=("$c")
|
||||
|
||||
if ssh -i "$SSH_KEY" root@"$REMOTE_SERVER" "docker stop $c" >/dev/null; then
|
||||
success "$c stopped"
|
||||
else
|
||||
error "Failed to stop $c"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user