From 77c5eb4740b85b4f1f635d5a21c7dcae8fc84312 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Sat, 25 Jul 2026 13:38:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=85=8D=E7=BD=AE=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E9=87=8D=E5=91=BD=E5=90=8D=E4=B8=BA=20safesightd.json?= =?UTF-8?q?.template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- safesightd.json.example => safesightd.json.template | 0 scripts/deploy/install.sh | 4 ++-- scripts/package.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename safesightd.json.example => safesightd.json.template (100%) diff --git a/safesightd.json.example b/safesightd.json.template similarity index 100% rename from safesightd.json.example rename to safesightd.json.template diff --git a/scripts/deploy/install.sh b/scripts/deploy/install.sh index a2fe8e2..2f5f671 100644 --- a/scripts/deploy/install.sh +++ b/scripts/deploy/install.sh @@ -41,8 +41,8 @@ cp "$SCRIPT_DIR/$BIN" "$INSTALL_DIR/bin/safesightd" chmod +x "$INSTALL_DIR/bin/safesightd" # 配置文件:仅在全新安装时创建,升级保留 -if [ "$UPGRADE" = false ] && [ -f "$SCRIPT_DIR/safesightd.json.example" ]; then - cp "$SCRIPT_DIR/safesightd.json.example" "$INSTALL_DIR/config/safesightd.json" +if [ "$UPGRADE" = false ] && [ -f "$SCRIPT_DIR/safesightd.json.template" ]; then + cp "$SCRIPT_DIR/safesightd.json.template" "$INSTALL_DIR/config/safesightd.json" echo " ✓ 配置已创建(请修改 agent_token)" else echo " ✓ 配置文件保留" diff --git a/scripts/package.sh b/scripts/package.sh index 2dd1b6b..22a7c38 100644 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -29,7 +29,7 @@ cp scripts/deploy/install.sh "$BUILD_DIR/" cp scripts/deploy/safesightd "$BUILD_DIR/" 2>/dev/null || true cp scripts/deploy/import-assets.py "$BUILD_DIR/scripts/" 2>/dev/null || true cp scripts/deploy/register-face-gallery.py "$BUILD_DIR/scripts/" 2>/dev/null || true -cp safesightd.json.example "$BUILD_DIR/safesightd.json.example" 2>/dev/null || true +cp safesightd.json.template "$BUILD_DIR/safesightd.json.template" 2>/dev/null || true echo " ✓ 部署脚本已复制" # ── 种子配置数据 ──