nixpkgs/upstart-jobs/portmap.nix
Ludovic Courtès cf16b3acfe Add `portmap' job.
svn path=/nixos/trunk/; revision=11140
2008-03-15 23:40:44 +00:00

36 lines
588 B
Nix

{ makePortmap }:
let uid = (import ../system/ids.nix).uids.portmap;
gid = (import ../system/ids.nix).gids.portmap;
in
{
name = "portmap";
users = [
{ name = "portmap";
inherit uid;
description = "portmap daemon user";
home = "/var/empty";
}
];
groups = [
{ name = "portmap";
inherit gid;
}
];
job =
let portmap = makePortmap { daemonUID = uid; daemonGID = gid; };
in
''
description "ONC RPC portmap"
start on network-interfaces/started
stop on network-interfaces/stop
respawn ${portmap}/sbin/portmap
'';
}