<div dir="ltr">Hi Zbyszek,<div><br></div><div>Thank you for your explanation.</div><div><br></div><div>However, I found that Conflicts= will be a good choice for me:</div><div><br></div><div><div>  # /etc/systemd/system/my-apps-start.target</div><div>  [Unit]</div><div>  Wants=docker.service sshd.service mongodb.service</div></div><div><br></div><div><div>  # /etc/systemd/system/my-apps-stop.target</div><div>  [Unit]</div><div>  Conflicts=docker.service sshd.service mongodb.service<br>  After=docker.service sshd.service mongodb.service<br></div></div><div><br></div><div>Then</div><div><br></div><div>  systemctl start my-apps-start.target # starts all my apps</div><div><div>  systemctl start my-apps-stop.target # stops all my apps</div></div><div><br></div><div>And both operations are sync, i.e. will wait for all apps to be started/stopped before systemctl exits.</div><div><br></div><div>Thank you all for solving my problems.</div><div><br></div><div>John Lin</div><br><div class="gmail_quote"><div dir="ltr">Zbigniew JÄ™drzejewski-Szmek <<a href="mailto:zbyszek@in.waw.pl" target="_blank">zbyszek@in.waw.pl</a>> æ–¼ 2018å¹´3月7æ—¥ 週三 下åˆ8:48寫é“:<br></div></div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Mar 06, 2018 at 03:07:30AM +0000, æž—è‡ªå‡ wrote:<br>
> Anyone?<br>
><br>
> John Lin<br>
><br>
> æž—è‡ªå‡ <<a href="mailto:johnlinp@gmail.com" target="_blank">johnlinp@gmail.com</a>> æ–¼ 2018å¹´2月27æ—¥ 週二 下åˆ6:20寫é“:<br>
><br>
> > Hi Jérémy,<br>
> ><br>
> > Thank you, but I read the section "Mapping of unit properties to their<br>
> > inverses" in the man page<br>
> > <a href="https://www.freedesktop.org/software/systemd/man/systemd.unit.html" rel="noreferrer" target="_blank">https://www.freedesktop.org/software/systemd/man/systemd.unit.html</a> and<br>
> > then found out the PropagatesReloadTo= and ReloadPropagatedFrom= are<br>
> > inverses to each other and both can be configured in a unit file. I was<br>
> > wondering why PartOf= and ConsistsOf= are not the case. Thank you.<br>
<br>
No particular reason, just noobody got around to implementing the<br>
parsing of that option. Shouldn't be too hard though.<br>
<br>
Zbyszek<br>
</blockquote></div></div></div>