#!/usr/bin/env bash # shellcheck shell=bash set -euo pipefail # shellcheck source=common.sh source "${LIB_DIR}/common.sh" need_root echo "更新子菜单" echo " 1) 快速更新 (git pull + pm2 restart)" echo " 2) 依赖更新 (pull + pip + restart)" echo " 0) 返回" read -r -p "选择: " choice case "${choice}" in 1) git -C "${REPO_ROOT}" pull --ff-only pm2 restart gold_monitor ;; 2) git -C "${REPO_ROOT}" pull --ff-only bash "${REPO_ROOT}/deploy/setup_env.sh" pm2 restart gold_monitor ;; *) echo "取消" ;; esac