Add curl|bash manage.sh with deploy/uninstall/update menu.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-25 08:47:35 +08:00
parent e19bb452f9
commit 2a29181a90
9 changed files with 533 additions and 32 deletions
Regular → Executable
+4 -11
View File
@@ -1,13 +1,6 @@
#!/usr/bin/env bash
# 首次安装到 /opt/eth_hedge_sim(仅 git clone,后续一律 git pull
# 兼容入口:转发到 manage.sh(推荐 curl | bash
# curl -fsSL https://git.bz121.com/dekun/eth_hedge_sim/raw/branch/main/deploy/manage.sh | bash
set -euo pipefail
REPO_URL="${REPO_URL:-https://git.bz121.com/dekun/eth_hedge_sim.git}"
ROOT="${INSTALL_ROOT:-/opt/eth_hedge_sim}"
if [[ ! -d "$ROOT/.git" ]]; then
mkdir -p "$(dirname "$ROOT")"
git clone "$REPO_URL" "$ROOT"
fi
bash "$ROOT/deploy/pull_and_restart.sh"
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
exec bash "${ROOT}/deploy/manage.sh" "$@"