1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/upstart-jobs/nscd.nix
Eelco Dolstra 29c5178bdf * Declarative specification of user accounts. Jobs can now specify a
list of user accounts that the job needs to run.  For instance, the
  SSH daemon job says:

    { name = "sshd";
      uid = (import ../system/ids.nix).uids.sshd;
      description = "SSH privilege separation user";
      home = "/var/empty";
    }

  The activation script creates the system users/groups and updates
  them as well.  So a change in the Nix expression can be realised in
  /etc/{group,passwd} by running nixos-rebuild.

svn path=/nixos/trunk/; revision=8846
2007-06-08 15:41:12 +00:00

36 lines
645 B
Nix

{glibc, pwdutils, nssModulesPath}:
{
name = "nscd";
users = [
{ name = "nscd";
uid = (import ../system/ids.nix).uids.nscd;
description = "Name service cache daemon user";
}
];
job = "
description \"Name Service Cache Daemon\"
start on startup
stop on shutdown
env LD_LIBRARY_PATH=${nssModulesPath}
start script
mkdir -m 0755 -p /var/run/nscd
mkdir -m 0755 -p /var/db/nscd
rm -f /var/db/nscd/* # for testing
end script
# !!! -d turns on debug info which probably makes nscd slower
# 2>/dev/null is to make it shut up
respawn ${glibc}/sbin/nscd -f ${./nscd.conf} -d 2> /dev/null
";
}