Systemd service life cycle
Ralf Mardorf
silver.bullet at zoho.com
Thu Apr 7 09:35:05 UTC 2016
On Thu, 7 Apr 2016 10:24:44 +0100, Colin Law wrote:
>OK, I think I have it. The answer (I hope) is to make A a oneshot
>service that starts the tunnel in the main thread, forks a
>supplementary process to carry on with the other tasks A has to
>perform, and sets RemainAfterExit so that systemd does not shutdown
>the forked process. Then A will not be considered started until it
>returns from the main thread, having setup the tunnel, and then B will
>be allowed to proceed.
>
>In fact I think a cleaner way will be to split A into A1, a oneshot
>process that opens the tunnel, and A2 that carries on with the tasks A
>performs, then A1 can have Before specs for A2 and B. I think that
>should do what I want.
If it should work, please post the unit files. Taking a look at such
files is easier to understand, than an explanation by text :).
More information about the ubuntu-users
mailing list