From eb90d9700958aefbc7b886f2b524c6d04dc1d80d Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sun, 30 Dec 2018 11:36:46 +0100 Subject: [PATCH] nixos/nslcd: use systemd's RuntimeDirectory --- nixos/modules/config/ldap.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nixos/modules/config/ldap.nix b/nixos/modules/config/ldap.nix index 9a84dd5f5c4..18823221990 100644 --- a/nixos/modules/config/ldap.nix +++ b/nixos/modules/config/ldap.nix @@ -232,9 +232,6 @@ in wantedBy = [ "multi-user.target" ]; preStart = '' - mkdir -p /run/nslcd - rm -f /run/nslcd/nslcd.pid; - chown nslcd.nslcd /run/nslcd ${optionalString (cfg.bind.distinguishedName != "") '' if test -s "${cfg.bind.password}" ; then ln -sfT "${cfg.bind.password}" /run/nslcd/bindpw @@ -254,6 +251,7 @@ in Type = "forking"; PIDFile = "/run/nslcd/nslcd.pid"; Restart = "always"; + RuntimeDirectory = [ "nslcd" ]; }; };