Files
crypto_monitor/manual_trading_hub/scripts/pm2_restart_agents.sh
T
dekun 9f67de3677 refactor: 移除 gate_bot,统一为三所架构并更新文档
删除 crypto_monitor_gate_bot 目录,中控与子代理改为 binance/okx/gate 三账户;
文档与 UI 文案「四所」改为「三所」;新增清库前一次性配置备份脚本。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 22:00:08 +08:00

24 lines
728 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
# 仅重启失败的子代理(保留 hub / 已 online 的 agent
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
HUB_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
ECO="${HUB_DIR}/ecosystem.config.cjs"
cd "${HUB_DIR}"
chmod +x scripts/run_agent.sh scripts/run_hub.sh 2>/dev/null || true
AGENTS=(manual-agent-binance manual-agent-okx manual-agent-gate)
for n in "${AGENTS[@]}"; do
pm2 delete "${n}" 2>/dev/null || true
done
pm2 start "${ECO}" --only manual-agent-binance
pm2 start "${ECO}" --only manual-agent-okx
pm2 start "${ECO}" --only manual-agent-gate
pm2 save 2>/dev/null || true
echo "已重建 binance / okx / gate 子代理,请执行: bash scripts/check_agents.sh"