diff --git a/scripts/cloudron-support b/scripts/cloudron-support index e81d25c20..0e08ebefe 100755 --- a/scripts/cloudron-support +++ b/scripts/cloudron-support @@ -885,8 +885,17 @@ function check_services() { local service_port=("3000" "3000" "3000" "3000" "2003" "3000") for service in "${!services[@]}"; do - if [[ $(docker inspect ${services[$service]} --format={{.State.Status}}) != "running" ]]; then - fail "Service '${services[$service]}' container is not running!" + local service_name="${services[$service]}" + local service_state + if ! service_state="$(docker inspect "${service_name}" --format={{.State.Status}} 2>/dev/null)"; then + service_state="missing" + fi + if [[ "${service_state}" != "running" ]]; then + if [[ "${service_state}" == "exited" ]] && [[ "${service_name}" == "mysql" || "${service_name}" == "postgresql" || "${service_name}" == "mongodb" ]]; then + warn "Service '${service_name}' is not running (may be lazy-stopped)" + else + fail "Service '${service_name}' container is not running (state: ${service_state})!" + fi continue fi