On Wed, 26.02.14 11:59, Usman (deser...@yahoo.com) wrote: > Hi Guys, > > > > I am getting started with systemd and am looking for a particular > answer. I know the config option "StartLimitAction=" will have a > pre-set option to choose from. It either restarts the box or so. But I > want to do something else as well. For example I want to execute a > script when rate limit configured and burst level is hit. Is there a > way to do that? Specifically I am looking for any message/event that I > can see on dbus etc to know that tha restart rate limit is hit and > we're restarting the box or just plainly stopping application (no more > restarts). Any way to do that?
You can invoke another service with OnFailure= as soon as your service fails. Then, you can pull the failure reason out of the original service via the bus and act on it. OnFailure=failure-handler@%p.servince and then in failure-handler@.service you take %i and use your own bus client or "systemctl show -p" to query the "Result" property which will tell you the reason the unit failed. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel