diff --git a/install.sh b/install.sh index c13da46..e2beffb 100755 --- a/install.sh +++ b/install.sh @@ -18,7 +18,6 @@ die() { echo "overcooked-install: $*" >&2; exit 1; } [ "$(id -u)" = 0 ] || die "请使用 sudo/root 执行" command -v docker >/dev/null 2>&1 || die "未找到 Docker Engine" docker compose version >/dev/null 2>&1 || die "未找到 Docker Compose v2" -command -v git >/dev/null 2>&1 || die "未找到 git" [ -n "$SERVER_IP" ] || SERVER_IP=$(ip -4 route get 1.1.1.1 2>/dev/null | awk '{for (i=1;i<=NF;i++) if ($i=="src") {print $(i+1); exit}}') [ -n "$SERVER_IP" ] || SERVER_IP=$(hostname -I 2>/dev/null | awk '{print $1}') [ -n "$SERVER_IP" ] || die "无法识别服务器 IP,请设置 OVERCOOKED_SERVER_IP" @@ -36,13 +35,8 @@ is_ipv4 "$SERVER_IP" || die "仅支持有效 IPv4 地址:$SERVER_IP" [ -n "$ACTIVATION_CODE" ] || die "授权码不能为空" install -d -m 700 "$ROOT" -for repo in OverCooked-S Overcooked-E; do - if [ ! -d "$ROOT/$repo/.git" ]; then - git clone --depth 1 "https://git.leee.xin/OverCooked/$repo.git" "$ROOT/$repo" - else - git -C "$ROOT/$repo" fetch --depth 1 origin && git -C "$ROOT/$repo" reset --hard FETCH_HEAD - fi -done +# This installer is intentionally source-free. It must never access the +# private OverCooked-S or Overcooked-E repositories. install -d -m 700 "$ROOT/config" command -v openssl >/dev/null 2>&1 || die "未找到 openssl" secret() { openssl rand -hex 32; } @@ -109,7 +103,7 @@ playback: node_id: e-$(hostname | tr -cd '[:alnum:]' | cut -c1-24) EOF chmod 600 "$ROOT/config/e-server.production.yaml" -cp "$ROOT/config/e-server.production.yaml" "$ROOT/Overcooked-E/deploy/compose/config/e-server.production.yaml" +die "公开部署资产缺失:当前 Installer 版本尚未发布 compose/migration 资产;请更新 Installer 包后重试" cat >"$ROOT/config/e-public.override.yml" <<'EOF' services: e-server: