You are not logged in.

#1 2012-06-01 21:14:16

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 807

[SOLVED] How to make a systemd .service start later

Yes, this is what i need.
Profile-sync-daemon's service, if loaded during startup, takes 15-18seconds.
While if i load it during my x session, when my hd is relaxed, it takes 2 - 6 seconds.
So i was looking for understanding how to "sleep 30" (may be?) that service and make it execute after i login. (Because it is not a service i need at once, but i need it as soon as i start my chromium, so it is not relevant during bootup)
Can anyone give me any suggestions?
Thanks a lot.

Last edited by nierro (2012-06-01 22:14:23)

Online

#2 2012-06-01 21:17:17

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] How to make a systemd .service start later

have a look at "man systemd.timer" -> OnBootSec= / OnStartupSec=

Offline

#3 2012-06-01 21:23:35

GogglesGuy
Member
From: Rocket City
Registered: 2005-03-29
Posts: 603
Website

Re: [SOLVED] How to make a systemd .service start later

nierro wrote:

Yes, this is what i need.
Profile-sync-daemon's service, if loaded during startup, takes 15-18seconds.
While if i load it during my x session, when my hd is relaxed, it takes 2 - 6 seconds.
So i was looking for understanding how to "sleep 30" (may be?) that service and make it execute after i login. (Because it is not a service i need at once, but i need it as soon as i start my chromium, so it is not relevant during bootup)
Can anyone give me any suggestions?
Thanks a lot.

Perhaps you could start it after the X session is running (aka make it depend on X)?

Offline

#4 2012-06-01 21:27:45

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 807

Re: [SOLVED] How to make a systemd .service start later

thanks!
I created psd.timer with following content:

[Timer]
OnStartupSec=25

But:

systemctl enable psd.timer
Warning: unit files do not carry install information. No operation executed.

Online

#5 2012-06-01 21:30:12

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] How to make a systemd .service start later

nierro wrote:

thanks!
I created psd.timer with following content:

[Timer]
OnStartupSec=25

But:

systemctl enable psd.timer
Warning: unit files do not carry install information. No operation executed.

add

[Install]
WantedBy=multi-user.target

...or just symlink it manually into /etc/systemd/system/multi-user.target.wants/

and don't forget to disable the actual psd.service

Offline

#6 2012-06-01 21:32:09

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 807

Re: [SOLVED] How to make a systemd .service start later

Ok thanks smile
Sorry, my first day with systemd big_smile
Thank you very much!

Online

Board footer

Powered by FluxBB