Clean up the nscd job

This commit is contained in:
Eelco Dolstra 2012-09-25 15:22:55 -04:00
parent 1ad655bdcf
commit fcebb3f3cd

View file

@ -38,10 +38,10 @@ in
description = "Name service cache daemon user"; description = "Name service cache daemon user";
}; };
jobs.nscd = boot.systemd.services.nscd =
{ description = "Name Service Cache Daemon"; { description = "Name Service Cache Daemon";
startOn = "startup"; wantedBy = [ "multi-user.target" ];
environment = { LD_LIBRARY_PATH = nssModulesPath; }; environment = { LD_LIBRARY_PATH = nssModulesPath; };
@ -52,15 +52,12 @@ in
mkdir -m 0755 -p /var/db/nscd mkdir -m 0755 -p /var/db/nscd
''; '';
path = [ pkgs.glibc ];
exec = "nscd -f ${./nscd.conf}";
daemonType = "fork";
serviceConfig = serviceConfig =
'' ''
ExecStart=@${pkgs.glibc}/sbin/nscd nscd -f ${./nscd.conf}
Type=forking
PIDFile=/run/nscd/nscd.pid PIDFile=/run/nscd/nscd.pid
Restart=always
ExecReload=${pkgs.glibc}/sbin/nscd --invalidate hosts ExecReload=${pkgs.glibc}/sbin/nscd --invalidate hosts
''; '';
}; };