audit echo vs log across all scripts — outcomes always visible, verbose for per-item loops
This commit is contained in:
@@ -395,7 +395,7 @@ local_start() {
|
||||
post_status=$(timeout "$DOCKER_TIMEOUT" docker inspect -f '{{.State.Running}}' \
|
||||
"$container" 2>/dev/null)
|
||||
if [[ "$post_status" == "true" ]]; then
|
||||
log "$ICON_STARTED $container started and running ✅"
|
||||
echo "$ICON_STARTED $container started and running ✅"
|
||||
return 0
|
||||
else
|
||||
error "$container started but crashed immediately"
|
||||
@@ -428,7 +428,7 @@ local_stop() {
|
||||
return 0
|
||||
fi
|
||||
timeout "$DOCKER_TIMEOUT" docker stop "$container" >/dev/null 2>&1 && \
|
||||
log "$ICON_STOPPED $container stopped" || \
|
||||
echo "$ICON_STOPPED $container stopped" || \
|
||||
error "Failed to stop $container locally"
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ remote_start() {
|
||||
"timeout $DOCKER_TIMEOUT docker inspect -f '{{.State.Running}}' \
|
||||
$container 2>/dev/null" 2>/dev/null)
|
||||
if [[ "$post_status" == "true" ]]; then
|
||||
log "$ICON_STARTED $container started on $REMOTE_SERVER_NAME ✅"
|
||||
echo "$ICON_STARTED $container started on $REMOTE_SERVER_NAME ✅"
|
||||
return 0
|
||||
else
|
||||
error "$container started on $REMOTE_SERVER_NAME but crashed immediately"
|
||||
@@ -497,7 +497,7 @@ remote_stop() {
|
||||
timeout "$SSH_TIMEOUT" ssh -i "$SSH_KEY" -o ConnectTimeout="$SSH_TIMEOUT" \
|
||||
root@"$REMOTE_SERVER" \
|
||||
"timeout $DOCKER_TIMEOUT docker stop $container" >/dev/null 2>&1 && \
|
||||
log "$ICON_STOPPED $container stopped on $REMOTE_SERVER_NAME" || \
|
||||
echo "$ICON_STOPPED $container stopped on $REMOTE_SERVER_NAME" || \
|
||||
error "Failed to stop $container on $REMOTE_SERVER_NAME"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user