summary refs log tree commit diff
path: root/nixos/modules/config/ldap.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/config/ldap.nix')
-rw-r--r--nixos/modules/config/ldap.nix4
1 files changed, 1 insertions, 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" ];
         };
       };