Installer/Updater
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.1 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. # Stop dance for nginx
  2. # =======================
  3. #
  4. # ExecStop sends SIGSTOP (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=Web server to provide Platform Configuration
  15. Documentation=man:nginx(8)
  16. After=network.target nss-lookup.target
  17. [Service]
  18. Type=forking
  19. PIDFile=/run/ag_nginx.pid
  20. ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;' -c /srv/etc/ag_nginx/ag_nginx.conf
  21. ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;' -c /srv/etc/ag_nginx/ag_nginx.conf
  22. ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload -c /srv/etc/ag_nginx/ag_nginx.conf
  23. ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/ag_nginx.pid
  24. TimeoutStopSec=5
  25. KillMode=mixed
  26. [Install]
  27. WantedBy=multi-user.target