1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 09:53:17 +00:00
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
'';
}