systemd unit file modification: start / stop both services at once
Hi,
I've made a slight adjustment to my systemd unit files for Mailman3 such that I only ever need to start / restart / stop mailman3.service and mailman3-web.service will have the same action automatically applied to it.
It's called Upholds
and binds the 2 services together.
I humbly suggest it become the default.
In my case, I added a file here:
/etc/systemd/system/mailman3.service.d/override.conf
with these lines:
[Unit] Upholds = mailman3-web.service Before = mailman3-web.service
Now, starting mailman3.service will *also* start mailman3-web.service.
Restarting mailman3.service will *also* restart mailman3-web.service.
Stopping mailman3.service will *also* stop mailman3-web.service.
Those 3 lines could be placed in mailman3.service, or something like
UpheldBy=mailman3.service
could go in the mailman3-web.service.
Hopefully this would make things slightly better for Mailman3 admins out there.
rb
participants (1)
-
Ron / BCLUG