Systemd service life cycle

Colin Law clanlaw at gmail.com
Sun Apr 10 07:31:38 UTC 2016


On 9 April 2016 at 23:15, Ralf Mardorf <silver.bullet at zoho.com> wrote:
> On Sat, 9 Apr 2016 22:06:43 +0100, Colin Law wrote:
>>On 9 April 2016 at 21:59, Tom H wrote:
>>> It's for a unit that doesn't have any active processes after
>>> ExecStart runs. I've used it for setting up networking and
>>> firewalling, for example.
>>
>>Is not the tunnel an 'active process' though?
>
> Systemd considers the oneshot service as active after a process
> exited, if you use RemainAfterExit=true or RemainAfterExit=yes.

OK, but I still don't understand why oneshot is more appropriate than
forking.  With oneshot would the service notice if the tunnel failed
for example, and restart the service?  I think that would happen with
forking, provided I set it up correctly.

Colin




More information about the ubuntu-users mailing list