On Fri, 12.02.16 20:58, Pathangi Janardhanan ([email protected]) wrote: > Hi All, > > The default target is usually set to multi-user or someother equivalent > target. Is there any way in systemd that I can say something like > > " If the system is reloaded n number of times within the last x second", > than set the default target to recover or emergency mode etc.? > > Basically I am looking for recovering from a failing unit/service that is > forcing the system to reboot, and that is going in a cycle?
You may configure whether a unit shall be automatically restarted with Restart=on-failure. You may put a limit on it with StartLimitInterval= and StartLimitBurst=. You may configure what shall happen if the limit is hit with StartLimitAction=, which includes making the system reboot. See the systemd.service and systemd.unit man pages. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
