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:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user