修复安装问题
This commit is contained in:
+6
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user