aboutsummaryrefslogtreecommitdiff
path: root/package/nginx/nginx.service
diff options
context:
space:
mode:
Diffstat (limited to 'package/nginx/nginx.service')
-rw-r--r--package/nginx/nginx.service13
1 files changed, 7 insertions, 6 deletions
diff --git a/package/nginx/nginx.service b/package/nginx/nginx.service
index 320df9a80e..11ccd62237 100644
--- a/package/nginx/nginx.service
+++ b/package/nginx/nginx.service
@@ -4,12 +4,13 @@ After=syslog.target network.target
[Service]
Type=forking
-PIDFile=/var/run/nginx.pid
-ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx
-ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
-ExecStart=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
-ExecReload=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;' -s reload
-ExecStop=/usr/sbin/nginx -g 'pid /var/run/nginx.pid;' -s quit
+LogsDirectory=nginx
+CacheDirectory=nginx
+PIDFile=/run/nginx.pid
+ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
+ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
+ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
+ExecStop=/usr/sbin/nginx -s quit
PrivateDevices=yes
[Install]