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

2016-08-30 Thread Che
On Tue, Aug 30, 2016 at 12:41 PM, Mantas Mikulėnas 
wrote:

> On Tue, Aug 30, 2016 at 6:31 PM, lin webber  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].
>


I'll bet a lot of people would like to see a long series of simple
"'systemd 101' HOWTO" examples like this one. All conveniently listed in
some easy-to-browse places online.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2016-08-30 Thread Mantas Mikulėnas
On Tue, Aug 30, 2016 at 6:31 PM, lin webber  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 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2016-08-30 Thread lin webber

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 ?   I like the logic of how systemd manage the system.but I'm not clearly 
about something in systemd. Thank you very much for your reply.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel