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 " ✓ 部署脚本已复制" # ── 种子配置数据 ──