[systemd-devel] Hand when using systemctl in unit files
Lennart Poettering
lennart at poettering.net
Mon Aug 1 16:02:58 PDT 2011
On Thu, 28.07.11 15:20, warpme (warpme at o2.pl) wrote:
>
> Zbyszek,
>
> Thx for replay.
> You touch exactly the point.
>
> >You can use more than one ExecStartPost. E.g.
> > ExecStartPost=sleep 10
> > ExecStartPost=systemctl try-restart proc2
> >This way you remove the unnecessary delay when starting proc2.
>
> This is exactly way how I want to implement this.
> Issue is that in systemd-29 it seems to impossible to successfully call systemctl from unit files.
> Processing of such unit simply hangs.
> I get impression systemctl can't be called recurrently.
It can. We do that by default in rsyslog.service for example. But you
need to make sure not to add deadlocks with that, or only trigger but
not synchonously wait for your operations. Use systemctl
--no-block for that.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list