From ea6be3f1d873380e1c21f9983ee4a9d269c66cf9 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 4 Sep 2026 08:52:55 +0000 Subject: [PATCH] release: sync public installer asset install.sh --- install.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 447f8b0..851240b 100644 --- a/install.sh +++ b/install.sh @@ -1277,8 +1277,18 @@ if [[ -n $MENU_PROFILES ]]; then else printf '正在创建并启动小雅控制器:xymedia-controller\n' fi - if ! run_logged "${COMPOSE[@]}" --profile "$profile" --project-directory "$INSTALL_DIR" --env-file "$INSTALL_DIR/.env" -f "$INSTALL_DIR/compose.yaml" up -d --no-deps "$profile_service"; then - die "小雅 profile 启动失败:$profile" + if ! run_logged "${COMPOSE[@]}" --profile "$profile" --project-directory "$INSTALL_DIR" --env-file "$INSTALL_DIR/.env" -f "$INSTALL_DIR/compose.yaml" up -d --no-deps --force-recreate "$profile_service"; then + if [[ $profile == xiaoya ]]; then + profile_state=$(docker inspect --format '{{.State.Status}}' "$XIAOYA_CONTAINER" 2>>"$INSTALL_LOG" || true) + else + profile_state=$(docker inspect --format '{{.State.Status}}' xymedia-controller 2>>"$INSTALL_LOG" || true) + fi + if [[ $profile_state == running ]]; then + printf '小雅 profile 启动命令返回异常,但目标容器已运行,继续安装:%s\n' "$profile" + printf '小雅 profile 启动命令返回异常,但目标容器已运行,继续安装:%s\n' "$profile" >>"$INSTALL_LOG" + else + die "小雅 profile 启动失败:$profile" + fi fi if [[ $profile == xiaoya ]]; then printf '小雅容器已启动:%s\n' "$XIAOYA_CONTAINER"