From e32d51a98900225e0a60b505fae743e844f36261 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:34:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Linux=20=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=90=AF=E5=8A=A8=E6=97=B6=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=86=99=E5=85=A5=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - install.sh: 安装时预生成默认配置文件到 /etc/portal_page/config.toml - systemd: ProtectSystem 从 strict 改为 full,避免 /etc 子目录写入被拒 - systemd: ReadWritePaths 简化为整个 INSTALL_DIR(含 templates/static/sock) --- install.sh | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 06ee50e..579512c 100644 --- a/install.sh +++ b/install.sh @@ -131,9 +131,30 @@ 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 "配置文件不存在,程序首次启动将自动生成默认配置" + info "预生成默认配置文件 ..." + cat > "${CONFIG_DIR}/config.toml" <