From 5184d42d000d33eabc6d127806d58fa23ba1d2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=87=E5=B3=B0?= Date: Thu, 28 May 2026 15:37:53 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=20install.sh=20?= =?UTF-8?q?=E4=B8=AD=E7=A1=AC=E7=BC=96=E7=A0=81=E7=9A=84=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 配置文件的生成和补全完全由 Go 程序负责,install.sh 只管目录和权限。 以后新增配置项只需改 Go 代码,无需同步修改安装脚本。 --- install.sh | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/install.sh b/install.sh index 579512c..a2dffdf 100644 --- a/install.sh +++ b/install.sh @@ -131,32 +131,11 @@ deploy_files() { cp -rf "${BUILD_DIR}/templates" "${INSTALL_DIR}/templates" cp -rf "${BUILD_DIR}/static" "${INSTALL_DIR}/static" - # 复制配置文件(仅当配置目录下不存在时预生成) - if [[ ! -f "${CONFIG_DIR}/config.toml" ]]; then - info "预生成默认配置文件 ..." - cat > "${CONFIG_DIR}/config.toml" <