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 2
2
Description =NGINX Agent
3
3
Documentation =https://github.com/nginx/agent#readme
4
4
After =network.target
5
- Wants =network-online .target
5
+ Wants =network.target
6
6
StartLimitIntervalSec =15
7
7
StartLimitBurst =5
8
8
@@ -11,24 +11,19 @@ User=${AGENT_USER}
11
11
Group =${AGENT_GROUP}
12
12
Type =simple
13
13
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
16
17
17
18
ExecStart =${AGENT_EXE}
18
-
19
19
RestartSec =5
20
- Restart =always
21
-
20
+ Restart =on-failure
22
21
PermissionsStartOnly =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
29
23
30
- ExecStop =/bin/kill -2 $MAINPID
31
- ExecStop =/bin/sleep 3
24
+ NoNewPrivileges =true
25
+ ProtectHome =off
26
+ PrivateTmp =true
32
27
33
28
[Install]
34
29
WantedBy =multi-user.target
Original file line number Diff line number Diff line change 6
6
7
7
8
8
AGENT_EXE=" /usr/bin/nginx-agent"
9
- AGENT_RUN_DIR=" /var/ run/nginx-agent"
9
+ AGENT_RUN_DIR=" /run/nginx-agent"
10
10
AGENT_LOG_DIR=" /var/log/nginx-agent"
11
11
AGENT_ETC_DIR=" /etc/nginx-agent"
12
12
AGENT_LIB_DIR=" /var/lib/nginx-agent/"
You can’t perform that action at this time.
0 commit comments