Detect Python/Node/PM2 on deploy (install only if missing); uninstall removes /opt/eth_hedge_sim.

Keep .env and DB backup under /root/backups before deleting the install directory.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-26 23:08:51 +08:00
parent 2b348854fe
commit 4d331da962
6 changed files with 185 additions and 30 deletions
+2
View File
@@ -22,6 +22,7 @@ run_pipeline() {
install_fresh() {
require_root
step "一键部署 — 环境检测与依赖"
ensure_system_deps
step "克隆仓库 → ${INSTALL_ROOT}"
if [[ -d "${INSTALL_ROOT}" ]]; then
@@ -34,6 +35,7 @@ install_fresh() {
install_repair() {
require_root
step "修复部署 — 环境检测与依赖"
ensure_system_deps
if ! REPO_ROOT="$(resolve_repo_root)"; then
die "未找到安装目录 ${INSTALL_ROOT}"