From 01305f98b53c5df14d2ac824c16504166908f76d Mon Sep 17 00:00:00 2001 From: hotyue <52734432+hotyue@users.noreply.github.com> Date: Sat, 11 Apr 2026 07:08:21 +0000 Subject: [PATCH] =?UTF-8?q?feat(master):=20Master=20=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=E9=80=8F=E6=98=8E=E7=BB=9F=E8=AE=A1=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E6=96=B0=E5=A2=9E=E9=83=A8=E7=BD=B2=E5=89=8D=E6=97=A7?= =?UTF-8?q?=E8=BF=9B=E7=A8=8B=E8=87=AA=E6=B4=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- master/install_master.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/master/install_master.sh b/master/install_master.sh index 3a45591..1f94784 100755 --- a/master/install_master.sh +++ b/master/install_master.sh @@ -29,6 +29,11 @@ if [ "$ACTION_CHOICE" == "2" ]; then exit 0 fi +# ================== [v3.1.1 延续: 安装前环境纯净度清理] ================== +echo -e "\n⏳ 正在清理旧版 Master 守护进程 (绝对安全保留 SQLite 数据库)..." +pkill -9 -f "tg_master.sh" >/dev/null 2>&1 || true +# ======================================================================= + # 1. 环境依赖安装 echo "[1/4] 安装核心依赖 (curl, jq, sqlite3)..." if [ -f /etc/debian_version ]; then @@ -87,4 +92,15 @@ pgrep -f tg_master.sh >/dev/null || nohup bash "${MASTER_DIR}/tg_master.sh" >/de echo "========================================================" echo "🎉 Master 控制中枢部署完成!" echo "🤖 机器人现已开始全局接客,等待边缘节点注册。" -echo "========================================================" \ No newline at end of file +echo "========================================================" + +# ================== [v3.1.2 新增: 玻璃房透明装机统计] ================== +echo -e "\n📡 正在向开源社区汇报装机量 (完全匿名,不收集IP)..." +MASTER_COUNT=$(curl -s -m 3 "https://ip-sentinel-count.samanthaestime296.workers.dev/ping/master" || echo "") + +if [ -n "$MASTER_COUNT" ] && [[ "$MASTER_COUNT" =~ ^[0-9]+$ ]]; then + echo -e "\033[32m✅ 感谢您成为全球第 ${MASTER_COUNT} 名 IP-Sentinel 指挥官!\033[0m" +else + echo -e "\033[32m✅ 感谢您建立 IP-Sentinel 司令部!\033[0m" +fi +echo -e "\n" \ No newline at end of file