You are not logged in.

#1 2014-02-13 13:13:56

schef
Member
Registered: 2009-04-16
Posts: 71

systemd service at the end of boot (login prompt)

hi guys..
i'm trying to start a script using systemd..
in my script the first thing i want to start is jack server on usb audio sound card..

the problem is that jack service is started before module is loaded so it gives error that sound card does nit exist..

is there a way to start the servuce at the end of boot process or after module is loaded..?

thanks

Offline

#2 2014-02-13 13:35:42

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,600
Website

Re: systemd service at the end of boot (login prompt)

Add the module to modules-load.d, and make sure your service starts after systemd-modules-load.service.

man modules-load.d
man systemd.unit

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2014-02-13 13:37:25

schef
Member
Registered: 2009-04-16
Posts: 71

Re: systemd service at the end of boot (login prompt)

thanks for the quick anwser..i will try it out later today..

Offline

#4 2014-02-13 13:37:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: systemd service at the end of boot (login prompt)

Is the script you're talking about a systemd service? Are you using https://wiki.archlinux.org/index.php/JA … mple_Setup ?

Offline

#5 2014-02-13 13:44:40

schef
Member
Registered: 2009-04-16
Posts: 71

Re: systemd service at the end of boot (login prompt)

i would want to use jack without x..for now..
no..the script would be started using systemd..

what i would have in script would be:
jackd
mididings
linuxsampler
jack_connect

would it be better to have a new service file for each of the lines or would the alltogether.sh script be ok..

Offline

#6 2014-02-14 13:22:08

schef
Member
Registered: 2009-04-16
Posts: 71

Re: systemd service at the end of boot (login prompt)

I'm back..
I tried to use:

Requires=systemd-modules-load.service
After=sound.target systemd-modules-load.service

But it loads it before dbus and some other stuff and it does not work..i still have an error no device found..

Then i added

Type=idle

And now it starts..but if i want to add more services dependent of this one..it starts them before this one loads..

Offline

Board footer

Powered by FluxBB