mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-07-19 15:29:08 +02:00

Our systemd unit doesn't follow the official recommendation, see https://www.nginx.com/resources/wiki/start/topics/examples/systemd/ Most importantly: * it should start after some additional specific targets/units * using PrivateTmp is a useful security feature, in particular to avoid cross domain scripting via the temp folder * using systemd's $MAINPID, we can distinguish between multiple running nginx instances correctly Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
16 lines
371 B
Desktop File
16 lines
371 B
Desktop File
[Unit]
|
|
Description=The NGINX HTTP and reverse proxy server
|
|
After=syslog.target network.target remote-fs.target nss-lookup.target
|
|
|
|
[Service]
|
|
Type=forking
|
|
PIDFile=/run/nginx/nginx.pid
|
|
ExecStartPre=@SBINDIR@/nginx -t
|
|
ExecStart=@SBINDIR@/nginx
|
|
ExecReload=@SBINDIR@/nginx -s reload
|
|
ExecStop=@BINDIR@/kill -s QUIT $MAINPID
|
|
PrivateTmp=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|