File tree Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change 22Description =NGINX Agent
33Documentation =https://github.com/nginx/agent#readme
44After =network.target
5- Wants =network-online .target
5+ Wants =network.target
66StartLimitIntervalSec =15
77StartLimitBurst =5
88
@@ -11,24 +11,19 @@ User=${AGENT_USER}
1111Group =${AGENT_GROUP}
1212Type =simple
1313
14- ExecStartPre =/bin/mkdir -p ${AGENT_RUN_DIR}
15- ExecStartPre =/bin/mkdir -p ${AGENT_LOG_DIR}
14+ LogsDirectory =nginx-agent
15+ RuntimeDirectory =nginx-agent
16+ StateDirectory =nginx-agent
1617
1718ExecStart =${AGENT_EXE}
18-
1919RestartSec =5
20- Restart =always
21-
20+ Restart =on-failure
2221PermissionsStartOnly =true
23- PIDFile =${AGENT_RUN_DIR}/nginx-agent.pid
24- Environment =
25-
26- StandardOutput =syslog
27- StandardError =syslog
28- SyslogIdentifier =nginx-agent
22+ TimeoutStopSec =5s
2923
30- ExecStop =/bin/kill -2 $MAINPID
31- ExecStop =/bin/sleep 3
24+ NoNewPrivileges =true
25+ ProtectHome =off
26+ PrivateTmp =true
3227
3328[Install]
3429WantedBy =multi-user.target
Original file line number Diff line number Diff line change 66
77
88AGENT_EXE=" /usr/bin/nginx-agent"
9- AGENT_RUN_DIR=" /var/ run/nginx-agent"
9+ AGENT_RUN_DIR=" /run/nginx-agent"
1010AGENT_LOG_DIR=" /var/log/nginx-agent"
1111AGENT_ETC_DIR=" /etc/nginx-agent"
1212AGENT_LIB_DIR=" /var/lib/nginx-agent/"
You can’t perform that action at this time.
0 commit comments