[systemd-devel] Watchdog post action

Lennart Poettering lennart at poettering.net
Tue Sep 29 12:12:16 PDT 2015


On Tue, 29.09.15 16:39, Iñigo Martínez (inigomartinez at gmail.com) wrote:

> I have been using systemd watchdog for controlling a home made daemon
> by restarting it when some timeouts happens. I want to know when it is
> happening, but I don't know how to do it.
> 
> I was thinking on wrapping the daemon inside a script to do an action
> if the daemon was killed, but if the daemon stops because a
> segmentation fault for example I will not notice the difference.
> 
> Is there anyway to do a post action when the watchdog happens ?

You should be able to place something in ExecStopPost= that checks the
Result bus property of the service.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list