forked from mirrors/nixpkgs
nixos/taskserver: Improve service dependencies
Using requiredBy is a bad idea for the initialisation units, because whenever the Taskserver service is restarted the initialisation units get restarted as well. Also, make sure taskserver-init.service will be ordered *before* taskserver.service. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
bb7a819735
commit
cf46256bbb
|
@ -395,7 +395,8 @@ in {
|
|||
};
|
||||
|
||||
systemd.services.taskserver-init = {
|
||||
requiredBy = [ "taskserver.service" ];
|
||||
wantedBy = [ "taskserver.service" ];
|
||||
before = [ "taskserver.service" ];
|
||||
description = "Initialize Taskserver Data Directory";
|
||||
|
||||
preStart = ''
|
||||
|
@ -449,7 +450,7 @@ in {
|
|||
})
|
||||
(mkIf needToCreateCA {
|
||||
systemd.services.taskserver-ca = {
|
||||
requiredBy = [ "taskserver.service" ];
|
||||
wantedBy = [ "taskserver.service" ];
|
||||
after = [ "taskserver-init.service" ];
|
||||
before = [ "taskserver.service" ];
|
||||
description = "Initialize CA for TaskServer";
|
||||
|
|
Loading…
Reference in a new issue