<div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 30, 2012 at 3:53 PM, David Strauss <span dir="ltr"><<a href="mailto:david@davidstrauss.net" target="_blank">david@davidstrauss.net</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
<div class="HOEnZb"><div class="h5">On Fri, Nov 30, 2012 at 2:28 PM, Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>> wrote:<br>
> I have a scenario where, I have foo.service which runs on boot and later<br>
> bar.service runs and it has to stop foo.service which I achieved by<br>
> declaring it as Conflicts= in the unit file but I would like to restart<br>
> foo.service when bar.service is stopped. I have run out of ideas on how to<br>
> achieve that. I am looking for help<br>
<br>
</div></div>It's intentionally not supported, but it has been proposed in some<br>
recent patches. I think it was proposed as OnStop= or OnShutdown=.<br>
<br>
Reindl's suggestion will probably do what you want, but systemd won't<br>
consider the stopping of the first service and the starting of the<br>
second a transaction.<br></blockquote><div> </div><div> </div><div>Hi David</div><div> </div><div>yeah OnStop= and/or OnShutdown= is something that will solve my problem exactly</div><div>Reindl's suggest I have already tried, it does not work.</div>
</div></div>