diff --git a/scripts/update.sh b/scripts/update.sh index f2f3e4c..b223366 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -487,6 +487,13 @@ for _svc in tenant-service im-service file-service update-service license-servic fi done +# 确保 nginx 在运行(一键更新时可能因 --remove-orphans 时序问题导致 nginx 被停掉) +if ! $_COMPOSE ps --services --filter status=running 2>/dev/null | grep -q "^nginx$"; then + info "nginx 未运行,正在启动 ..." + $_COMPOSE up -d --no-deps nginx + ok "nginx 已启动" +fi + # --------------------------------------------------------------------------- # Step 7 — 等待 tenant-service 健康 # ---------------------------------------------------------------------------