On 7/27/11 11:19 PM, Kok, Auke-jan H wrote:
2011/7/27 Warpme<war...@o2.pl>:Hi, I really like systemd concept. I want to use systemctl to control other unit from given unit. I'm on systemd-29Example: unit1: ExecStartPre=systemctl restart service2.service Issuing "systemctl restart unit1.service" gives hang on this command (I have to terminate manually systemctl) While I don't know is this by design behavior or not - I think it would be nice to have possibility to control units from other unitsCan you explain why you need this? This sounds like you have a broken design to begin with, and you're masking it with something that is even more broken. Please try to use more arguments than "nice to have" but give a real example. Auke
Hi, Thx for replay.Indeed probably my approach is suboptimal but currently I can't find better solution.
Usecase if following: My server has some services which are servers for other services.e.g. proc1 is required to operate for proc2. Abort of proc1 requires ordered restart of proc2 with given delay.
Currently my implementation is quite dumb: -I'm terminating proc2 via proc1's ExecStartPost killall proc2 -proc2 have ExecStartPre with sleep <delay> Issue with such approach is that I have always <delay> when proc2 starts.I believe more elegant will be use systemctl in proc1 unit to force restart of proc2
Is there better way to do this ? br
<<attachment: warpme.vcf>>
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel