[systemd-devel] Global Configuration to Restart all Daemons on Failure/Crash
lennart at poettering.net
Mon Nov 30 08:59:21 PST 2015
On Mon, 30.11.15 21:51, P.R.Dinesh (pr.dinesh at gmail.com) wrote:
> I want to restart any of my daemons (controlled by systemd) on
> I can do this individually by setting the Restart=on-failure in the daemon
> specific service file. But I want a global configuration by which we can
> instruct the systemd to restart any service when it crashes.
> Could you please share me on how to achieve this feature.
This is not available, and this is something we are unlikely to add,
because there are many services where such behaviour is not desired,
and automatic restarting is something to decide on on a case-by-case
basis. For example many of systemd's own daemons operate in a
start-on-demand + exit-on-idle way, and it would be seriously wrong to
automatically restart them whenever they exit, because they are
explicitly designed to exit all the time, and that's OK. If you'd turn
on a global switch that restarts all services when they exit, then
you'd effectively break all daemons that work that way, including half
of systemd's own.
Lennart Poettering, Red Hat
More information about the systemd-devel