meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.service
Szombathelyi György 8e6425cfa1 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>
2016-08-22 15:52:32 +02:00

12 lines
238 B
Desktop File

[Unit]
Description=Nginx Server
After=network.target
[Service]
Type=forking
PIDFile=/run/nginx/nginx.pid
ExecStart=@SBINDIR@/nginx
ExecStop=@SBINDIR@/nginx -s stop
ExecReload=@SBINDIR@/nginx -s reload
[Install]
WantedBy=multi-user.target