Upon getting this type of error:
nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: core-dump) since Mon 2022-09-26 22:17:21 UTC; 8h ago
Docs: man:nginx(8)
there was an attempt to monitor and restart nginx when it would fail. Yet, different syntassi are proposed in various sources:
Restart=always
Restart=on-failure
The documentation for either the timers or the units do not describe this parameter. Which also creates uncertainty as to what is the default timer and whether it should be specifically set.
The nginx.service
file was edited to include one, then the other from directory /usr/lib/systemd/system
.
Interestingly, directory /lib/systemd/system
has the same file (and neither is indicated as an alias; I assume a directory alias is in play?) and a change to one is reflected on the other.
All changes were followed up by a systemctl daemon-reload
The change did not restart nginx as expected. Thus:
- what is the difference between these two syntassi
- what timer is applied by default if none is specified