services.mailman: RemainAfterExit so settings take effect properly

Prior to this fix, changes to certain settings would not be applied
automatically and users would have to know to manually restart the
affected service.  A prime example of this is
`services.mailman.hyperkitty.baseUrl`, or various things that affect
`mailman3/settings.py`
This commit is contained in:
Benjamin Staffin 2020-03-01 16:00:01 -05:00 committed by Alyssa Ross
parent d54f028941
commit 3a2790c342

View file

@ -265,6 +265,11 @@ in {
'';
serviceConfig = {
Type = "oneshot";
# RemainAfterExit makes restartIfChanged work for this service, so
# downstream services will get updated automatically when things like
# services.mailman.hyperkitty.baseUrl change. Otherwise users have to
# restart things manually, which is confusing.
RemainAfterExit = "yes";
};
};
@ -282,6 +287,9 @@ in {
serviceConfig = {
User = cfg.webUser;
Type = "oneshot";
# Similar to mailman-settings.service, this makes restartTriggers work
# properly for this service.
RemainAfterExit = "yes";
WorkingDirectory = "/var/lib/mailman-web";
};
};