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