You are not logged in.

#1 2012-09-27 07:50:17

nomenquis
Member
Registered: 2009-11-29
Posts: 6

[SOLVED] systemd service dependencies

Hi,

I've just setup a new arch install, using a pure systemd setup.

I have two services, tinc and tinyproxy. In my case tinyproxy will only bind to an interface that tinc sets ups. So I have to make sure that tinyproxy startup depends on tinc. Now, I could edit the service file installed by the tinyproxy package, but I'd like to know if there is a better way to do that. With the old rc.conf sysinit I simply made sure to have the demons in the correct order and everything worked smile


So, is there a better way to add custom dependencies between systemd services besides manually editing the service files?

kind regards

Last edited by nomenquis (2012-09-27 08:00:56)

Offline

#2 2012-09-27 07:54:45

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: [SOLVED] systemd service dependencies

Don't edit the package-provided .service file, it'll be overwritten when the package gets updated. Instead, copy it to /etc/systemd/system, and edit it there.

There's no other dependency mechanism as far as I know.


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 2012-09-27 08:00:28

nomenquis
Member
Registered: 2009-11-29
Posts: 6

Re: [SOLVED] systemd service dependencies

WorMzy wrote:

Don't edit the package-provided .service file, it'll be overwritten when the package gets updated.

Yea, that's why I was afraid / didn't want to edit them :)

WorMzy wrote:

Instead, copy it to /etc/systemd/system, and edit it there.
There's no other dependency mechanism as far as I know.

Ahh, didn't know that /etc/ files would override the ones provided in /usr/lib/...
I suspected there was some simple mechanism but seem to have missed that one.
Thanks a lot!

kind regards

Offline

Board footer

Powered by FluxBB