nixpkgs-suyu/upstart-jobs/samba.nix
Eelco Dolstra 4d4387a70e * Allow jobs to specify groups.
svn path=/nixos/trunk/; revision=8862
2007-06-10 20:13:12 +00:00

44 lines
571 B
Nix

{pkgs, samba, glibc}:
let
user = "smbguest";
group = "smbguest";
in
{
name = "samba";
users = [
{ name = user;
description = "Samba service user";
group = group;
}
];
groups = [
{ name = group;
}
];
job = "
description \"Samba Service\"
start on network-interfaces/started
stop on network-interfaces/stop
start script
${samba}/sbin/nmbd -D &
${samba}/sbin/smbd -D &
${samba}/sbin/winbindd -B &
end script
respawn ${samba}/sbin/nmbd -D &; ${samba}/sbin/smbd -D &; ${samba}/sbin/winbindd -B &
";
}