2007-06-10 20:13:12 +00:00
|
|
|
{pkgs, samba, glibc}:
|
2007-05-28 14:09:04 +00:00
|
|
|
|
|
|
|
let
|
2007-05-28 15:39:25 +00:00
|
|
|
|
2007-06-08 15:41:12 +00:00
|
|
|
user = "smbguest";
|
|
|
|
group = "smbguest";
|
|
|
|
|
2007-05-28 14:09:04 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "samba";
|
|
|
|
|
2007-06-08 15:41:12 +00:00
|
|
|
users = [
|
|
|
|
{ name = user;
|
|
|
|
description = "Samba service user";
|
|
|
|
group = group;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2007-06-10 20:13:12 +00:00
|
|
|
groups = [
|
|
|
|
{ name = group;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2007-05-28 14:09:04 +00:00
|
|
|
job = "
|
|
|
|
|
|
|
|
description \"Samba Service\"
|
|
|
|
|
|
|
|
start on network-interfaces/started
|
|
|
|
stop on network-interfaces/stop
|
|
|
|
|
|
|
|
start script
|
|
|
|
|
2007-06-08 15:41:12 +00:00
|
|
|
${samba}/sbin/nmbd -D &
|
|
|
|
${samba}/sbin/smbd -D &
|
|
|
|
${samba}/sbin/winbindd -B &
|
2007-05-28 14:09:04 +00:00
|
|
|
|
|
|
|
end script
|
|
|
|
|
|
|
|
respawn ${samba}/sbin/nmbd -D &; ${samba}/sbin/smbd -D &; ${samba}/sbin/winbindd -B &
|
|
|
|
|
|
|
|
";
|
|
|
|
|
|
|
|
}
|