summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/nginx/files
diff options
context:
space:
mode:
authorSzombathelyi György <gyurco@freemail.hu>2016-08-18 15:58:34 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2016-08-22 15:52:32 +0200
commit8e6425cfa130a181b22077aa9153704c229ed4d7 (patch)
tree5b6933e007eeda19955ab7c1e64094c65cf82ee5 /meta-webserver/recipes-httpd/nginx/files
parent6c7c69c700f367c131ddb942f44185b474feceac (diff)
downloadmeta-openembedded-8e6425cfa130a181b22077aa9153704c229ed4d7.tar.gz
nginx: optimize systemd unit file
- Call the nginx binary directly, no need to wrap the SysV init file. - Create /var/log/nginx with tmpfiles, like volatiles without systemd. - Run nginx with ${NGINX_USER} (user ${NGINX_USER} in nginx.conf) Signed-off-by: Gyorgy Szombathelyi <gyurco@freemail.hu> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-webserver/recipes-httpd/nginx/files')
-rw-r--r--meta-webserver/recipes-httpd/nginx/files/nginx.service9
1 files changed, 4 insertions, 5 deletions
diff --git a/meta-webserver/recipes-httpd/nginx/files/nginx.service b/meta-webserver/recipes-httpd/nginx/files/nginx.service
index 9926a4b9d..ce9906171 100644
--- a/meta-webserver/recipes-httpd/nginx/files/nginx.service
+++ b/meta-webserver/recipes-httpd/nginx/files/nginx.service
@@ -3,10 +3,9 @@ Description=Nginx Server
3After=network.target 3After=network.target
4[Service] 4[Service]
5Type=forking 5Type=forking
6PIDFile=@SYSCONFDIR@/nginx/run/nginx.pid 6PIDFile=/run/nginx/nginx.pid
7ExecStartPre=@BASEBINDIR@/mkdir -p @LOCALSTATEDIR@/log/nginx 7ExecStart=@SBINDIR@/nginx
8ExecStart=@SYSCONFDIR@/init.d/nginx start 8ExecStop=@SBINDIR@/nginx -s stop
9ExecStop=@SYSCONFDIR@/init.d/nginx stop 9ExecReload=@SBINDIR@/nginx -s reload
10[Install] 10[Install]
11WantedBy=multi-user.target 11WantedBy=multi-user.target
12