修复安装问题

This commit is contained in:
2026-06-23 14:57:36 +08:00
parent a316932d3f
commit d8779ed5bf
3 changed files with 18 additions and 4 deletions
+6 -2
View File
@@ -42,13 +42,17 @@ chmod 0755 "${INSTALL_DIR}"
find "${INSTALL_DIR}/templates" -type d -exec chmod 0755 {} \;
find "${INSTALL_DIR}/templates" -type f -exec chmod 0644 {} \;
SOCKET_PATH="${INSTALL_DIR}/web.sock"
if [[ ! -f "${CONFIG_DIR}/config.yaml" ]]; then
SECRET=$(openssl rand -hex 32)
cat > "${CONFIG_DIR}/config.yaml" <<EOF
database:
type: sqlite
dsn: ""
port: "8080"
web:
port: "8080"
socket: ${SOCKET_PATH}
path: ${DATA_DIR}
secret: ${SECRET}
EOF
@@ -68,7 +72,7 @@ Type=simple
User=${SERVICE_USER}
Group=${SERVICE_USER}
WorkingDirectory=${INSTALL_DIR}
ExecStart=${INSTALL_DIR}/${BINARY_NAME}
ExecStart=${INSTALL_DIR}/${BINARY_NAME} -config ${CONFIG_DIR}/config.yaml
Restart=on-failure
RestartSec=5s
NoNewPrivileges=true