Advertisement
Guest User

nginx sysd

a guest
Aug 3rd, 2022
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. # Stop dance for nginx
  2. # =======================
  3. #
  4. # ExecStop sends SIGQUIT (graceful stop) to the nginx process.
  5. # If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
  6. # and sends SIGTERM (fast shutdown) to the main process.
  7. # After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
  8. # SIGKILL to all the remaining processes in the process group (KillMode=mixed).
  9. #
  10. # nginx signals reference doc:
  11. # http://nginx.org/en/docs/control.html
  12. #
  13. [Unit]
  14. Description=A high performance web server and a reverse proxy server
  15. Documentation=man:nginx(8)
  16. After=network.target nss-lookup.target
  17.  
  18. [Service]
  19. Type=forking
  20. PIDFile=/run/nginx.pid
  21. ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
  22. ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
  23. ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
  24. ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid
  25. TimeoutStopSec=5
  26. KillMode=mixed
  27.  
  28. [Install]
  29. WantedBy=multi-user.target
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement