Files
eth_hedge_sim/deploy/bootstrap.sh
T
2026-07-24 16:33:25 +08:00

14 lines
374 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 首次安装到 /opt/eth_hedge_sim(仅 git clone,后续一律 git pull
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"