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

# Stop dance for nginx
# =======================
#
# ExecStop sends SIGSTOP (graceful stop) to the nginx process.
# If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
# and sends SIGTERM (fast shutdown) to the main process.
# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
#
# nginx signals reference doc:
# http://nginx.org/en/docs/control.html
#
[Unit]
Description=Web server to provide Platform Configuration
Documentation=man:nginx(8)
After=network.target nss-lookup.target
[Service]
Type=forking
PIDFile=/run/ag_nginx.pid
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;' -c /srv/etc/ag_nginx/ag_nginx.conf
ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;' -c /srv/etc/ag_nginx/ag_nginx.conf
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload -c /srv/etc/ag_nginx/ag_nginx.conf
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/ag_nginx.pid
TimeoutStopSec=5
KillMode=mixed
[Install]
WantedBy=multi-user.target