More configuratbility for vsFTPd upstart job.
svn path=/nixos/trunk/; revision=12472
This commit is contained in:
parent
3721828bc6
commit
cb8067cdb5
|
@ -1684,6 +1684,27 @@
|
||||||
Whether to enable the anonymous FTP user.
|
Whether to enable the anonymous FTP user.
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
writeEnable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "
|
||||||
|
Whether any write activity is permitted to users.
|
||||||
|
";
|
||||||
|
};
|
||||||
|
|
||||||
|
anonymousUploadEnable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "
|
||||||
|
Whether any uploads are permitted to anonymous users.
|
||||||
|
";
|
||||||
|
};
|
||||||
|
|
||||||
|
anonymousMkdirEnable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "
|
||||||
|
Whether mkdir is permitted to anonymous users.
|
||||||
|
";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
printing = {
|
printing = {
|
||||||
|
|
|
@ -317,7 +317,8 @@ let
|
||||||
++ optional config.services.vsftpd.enable
|
++ optional config.services.vsftpd.enable
|
||||||
(import ../upstart-jobs/vsftpd.nix {
|
(import ../upstart-jobs/vsftpd.nix {
|
||||||
inherit (pkgs) vsftpd;
|
inherit (pkgs) vsftpd;
|
||||||
inherit (config.services.vsftpd) anonymousUser;
|
inherit (config.services.vsftpd) anonymousUser
|
||||||
|
writeEnable anonymousUploadEnable anonymousMkdirEnable;
|
||||||
})
|
})
|
||||||
|
|
||||||
# X Font Server
|
# X Font Server
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
{ vsftpd, anonymousUser }:
|
{ vsftpd, anonymousUser
|
||||||
|
, anonymousUploadEnable, anonymousMkdirEnable, writeEnable
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "vsftpd";
|
name = "vsftpd";
|
||||||
|
@ -40,6 +42,27 @@ start script
|
||||||
"anonymous_enable=YES"
|
"anonymous_enable=YES"
|
||||||
else
|
else
|
||||||
"anonymous_enable=NO") +
|
"anonymous_enable=NO") +
|
||||||
|
(if writeEnable then
|
||||||
|
"
|
||||||
|
write_enable=YES"
|
||||||
|
else
|
||||||
|
"
|
||||||
|
write_enable=NO"
|
||||||
|
) +
|
||||||
|
(if anonymousUploadEnable then
|
||||||
|
"
|
||||||
|
anon_upload_enable=YES"
|
||||||
|
else
|
||||||
|
"
|
||||||
|
anon_upload_enable=NO"
|
||||||
|
) +
|
||||||
|
(if anonymousMkdirEnable then
|
||||||
|
"
|
||||||
|
anon_mkdir_write_enable=YES"
|
||||||
|
else
|
||||||
|
"
|
||||||
|
anon_mkdir_write_enable=NO"
|
||||||
|
) +
|
||||||
"
|
"
|
||||||
background=NO
|
background=NO
|
||||||
listen=YES
|
listen=YES
|
||||||
|
|
Loading…
Reference in a new issue