[systemd-devel] A question of sequential control of systemd service.

Mantas Mikulėnas grawity at gmail.com
Tue Aug 30 16:41:38 UTC 2016


On Tue, Aug 30, 2016 at 6:31 PM, lin webber <WebberLin at outlook.com> wrote:

>
>
> hello:
>         I have a question about systemd unit. I'm using ubuntu 16.04 whih
> lightdm display manager . I have a service that I want to start it
> completely before the lightdm service . it means that my service and
> lightdm is not parallel started .  how can i write my unit file ,and what
> to add in my service code ?
>

Use a Type= that lets systemd know when your service has 'started', e.g.
Type=forking, Type=notify, or Type=dbus.

e.g. for Type=notify make sure to call sd_notify(0, "READY=1") after
startup.

Then add "Before=lightdm.service" to [Unit].

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160830/2abdf199/attachment.html>


More information about the systemd-devel mailing list