Skip to content

Commit 4b94342

Browse files
committed
Replace ExecStartPre commands with systemd native directives
1 parent 609f54d commit 4b94342

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/packages/nginx-agent.service

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ User=${AGENT_USER}
1111
Group=${AGENT_GROUP}
1212
Type=simple
1313

14-
ExecStartPre=/bin/mkdir -p ${AGENT_RUN_DIR} ${AGENT_LOG_DIR}
15-
ExecStartPre=/bin/chown -R ${AGENT_USER}:${AGENT_GROUP} ${AGENT_RUN_DIR} ${AGENT_LOG_DIR}
16-
ExecStart=${AGENT_EXE}
14+
LogsDirectory=nginx-agent
15+
RuntimeDirectory=nginx-agent
16+
StateDirectory=nginx-agent
1717

18+
ExecStart=${AGENT_EXE}
1819
RestartSec=5
1920
Restart=on-failure
2021
PermissionsStartOnly=true

0 commit comments

Comments
 (0)