<div dir="ltr">Hi,<div>Can you please help ?</div><div>I see that in <span style="color:rgb(0,0,0);white-space:pre-wrap">OnFailure behaviour is changed and these units in </span><span style="color:rgb(0,0,0);white-space:pre-wrap">OnFailure gets triggerd when service is failed-and-will-not-restart-automatically.</span></div><div><a href="https://lists.freedesktop.org/archives/systemd-devel/2018-June/040879.html">https://lists.freedesktop.org/archives/systemd-devel/2018-June/040879.html</a></div><div>In such case, does systemd also send dbus signal whenever it triggers OnFailure ?</div><div>Thanks</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 18, 2022 at 8:55 PM Prashantkumar dhotre <<a href="mailto:cdprashanth@gmail.com">cdprashanth@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div>In my app, I am monitoring a few services and would like to do some cleanup in my app, when these services fail in such a way that they don't restart back up without admin action.</div><div></div><div>From dbus-monitor , I see that 'Result' dbus PropertiesChanged signal comes first and then 'ActiveState' PropertiesChanged signal comes next.</div><div>I was hoping that to use
'ActiveState' = "failed" and "SubState" = "failed" but that does not satisfy my requirement as </div><div><div>when I send sigkill i get "ActiveState" and "SubState" as "failed" in DBus notification but service starts back up automatically (due to 'Restart' & 'ActiveState'settings )</div></div><div>Also when app exits with non-zero code also , I get "ActiveState" and "SubState" as "failed" in DBus notification.</div><div>So I can not use only "ActiveState" and "SubState" values , as app restarts after these states report "failed" (in which case my app should not do cleanup)</div><div>Using dbus notification, how can determine that service is down and not going to start automatically so that in my app i can do cleanup ?</div><div>Is there any parameter in PropertiesChanged signal that tells that app is down and will not start back up automatically ?</div><div>I am using systemd 243.</div><div>Thanks for your help.</div><div>Regards</div><div><br></div><div><br></div><div><div><br></div><div></div></div></div>
</blockquote></div>