Restart systemd service *without* restarting dependents
0
votes
0
answers
22
views
I have four
systemd
services: {a,b,c,d}.service
. d.service
is the "main" service, and it is the one that parses the configuration file for all four. Typically, the four are started together.
To make it easier to apply configuration changes, I have marked {a,b,c}.service
as PartOf=d.service
in their unit files. That way, when I restart d.service
, the configuration changes are applied across all four services.
However, there are circumstances (debugging, for example) where I want to **only** restart d.service
without affecting {a,b,c}.service
. Is there a way for me to do this, either through options for the systemctl restart
command or through unit file configurations?
I could also, I suppose, make a wrapper service - e.service
- that contains {a,b,c,d}.service
and then restart that when I want to apply config changes. I wanted to see if there was a way to do this without adding a fifth service, though.
This is perhaps a misuse of systemd
, and I'll gladly take recommendations for ways that I can structure this configuration better.
Asked by chrysolepis
(1 rep)
Aug 6, 2025, 01:00 PM
Last activity: Aug 6, 2025, 02:55 PM
Last activity: Aug 6, 2025, 02:55 PM