From fcebb3f3cde263879d4ea99470ec637e84d4da82 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 25 Sep 2012 15:22:55 -0400 Subject: [PATCH] Clean up the nscd job --- modules/services/system/nscd.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/services/system/nscd.nix b/modules/services/system/nscd.nix index d92e4e608b5..620424b94a0 100644 --- a/modules/services/system/nscd.nix +++ b/modules/services/system/nscd.nix @@ -38,10 +38,10 @@ in description = "Name service cache daemon user"; }; - jobs.nscd = + boot.systemd.services.nscd = { description = "Name Service Cache Daemon"; - startOn = "startup"; + wantedBy = [ "multi-user.target" ]; environment = { LD_LIBRARY_PATH = nssModulesPath; }; @@ -52,15 +52,12 @@ in mkdir -m 0755 -p /var/db/nscd ''; - path = [ pkgs.glibc ]; - - exec = "nscd -f ${./nscd.conf}"; - - daemonType = "fork"; - serviceConfig = '' + ExecStart=@${pkgs.glibc}/sbin/nscd nscd -f ${./nscd.conf} + Type=forking PIDFile=/run/nscd/nscd.pid + Restart=always ExecReload=${pkgs.glibc}/sbin/nscd --invalidate hosts ''; };