Having already queried on the matter of syntax for restarting a server and having modified nginx.service by adding Restart=always for a few servers, a few weeks later I find the configuration file is devoid of this option.
Could I possibly have misconfigured the option in the wrong block ([Service]) or is there a mechanism by which this file is overwritten and reset to a default state?
What is a sound approach to monitoring this situation, as one of the servers nginx has decided to fall over frequently (possibly daily - a suspect is letsencrypt renewal verifications process) ?
[Unit]
Description=A high performance web server and a reverse proxy server
Documentation=man:nginx(8)
After=network.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid
TimeoutStopSec=5
KillMode=mixed
[Install]
WantedBy=multi-user.target