3
0
Fork 0
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:
aszlig 2016-04-12 06:33:04 +02:00
parent bb7a819735
commit cf46256bbb
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

@ -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";