diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2004-12-30 00:21:46 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2004-12-30 00:21:46 +0000 |
commit | da213c9bd5881d5b4e341832584fe43a6f8c9ae4 (patch) | |
tree | 07e465b6f5859c4a438ae164f26aee346c44e4eb /packages/pure-ftpdsettings.xml | |
parent | f5e25171e13ba5361821148b64c26d2476097d12 (diff) | |
download | pfsense-packages-da213c9bd5881d5b4e341832584fe43a6f8c9ae4.tar.gz pfsense-packages-da213c9bd5881d5b4e341832584fe43a6f8c9ae4.tar.bz2 pfsense-packages-da213c9bd5881d5b4e341832584fe43a6f8c9ae4.zip |
Update package startup file when options are changed.
Diffstat (limited to 'packages/pure-ftpdsettings.xml')
-rw-r--r-- | packages/pure-ftpdsettings.xml | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/packages/pure-ftpdsettings.xml b/packages/pure-ftpdsettings.xml index 70575a85..231070e9 100644 --- a/packages/pure-ftpdsettings.xml +++ b/packages/pure-ftpdsettings.xml @@ -69,12 +69,6 @@ <type>checkbox</type> </field> <field> - <fielddescr>Client File Deletion</fielddescr> - <fieldname>filedeletion</fieldname> - <description>Allow clients to upload files but disallow their ability to delete uploaded items.</description> - <type>checkbox</type> - </field> - <field> <fielddescr>NAT Workaround mode</fielddescr> <fieldname>natworkaround</fieldname> <description>NAT mode. Force active mode. If your FTP server is behind a NAT box that doesn't support applicative FTP proxying, or if you use port redirection without a transparent FTP proxy, use this. Well... the previous sentence isn't very clear. Okay: if your network looks like this: FTP--NAT.gateway/router--Internet and if you want people coming from the internet to have access to your FTP server, please try without this option first. If Netscape clients can connect without any problem, your NAT gate-way rulez. If Netscape doesn't display directory listings, your NAT gateway sucks.</description> @@ -86,6 +80,22 @@ <custom_deinstall_php_command> </custom_deinstall_php_command> <custom_add_php_command> + mwexec("rm /usr/local/etc/rc.d/pure-ftp*"); + $fout = fopen("/usr/local/etc/rc.d/pure-ftpd.sh","w"); + fwrite($fout, "#!/bin/sh\n\n"); + $startline = "/usr/local/sbin/pure-ftpd"; + if($_POST['connections']) $startline .= " -c " . $_POST['connections']; + if($_POST['connectionsperip']) $startline .= " -C " . $_POST['connectionsperip']; + if($_POST['cutoffthreshold']) $startline .= " -k " . $_POST['cutoffthreshold'];; + if($_POST['beginport'] and $_POST['endport']) $startline .= " -P " . $_POST['beginport'] . ":" . $_POST['endport']; + if($_POST['uploadbw'] and $_POST['downloadbw']) $startline .= " -T " . $_POST['uploadbw'] . ":" . $_POST['downloadbw'];; + if($_POST['natworkaround']) $startline .= " -N"; + if($_POST['filedeletion']) $startline .= " -K"; + $startline .= "-B /usr/local/etc/pure-ftpd.conf"; + fwrite($fout, $startline . "\n"); + fclose($fout); + mwexec("chmod a+x /usr/local/etc/rc.d/pure-ftpd.sh"); + mwexec("/usr/local/etc/rc.d/pure-ftpd.sh"); </custom_add_php_command> <custom_delete_php_command> </custom_delete_php_command> |