summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-07-07 03:20:13 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-07-07 03:20:13 +0000
commit463cefdb2c7b1698403186d0b2c289dd95efad99 (patch)
tree1d5ae43d9865e4941a0d056504c17c270ef0c2a9 /etc/inc/config.inc
parentea29f28ee4ec98382c5ae14345f6564aaf0f8bc5 (diff)
downloadpfsense-463cefdb2c7b1698403186d0b2c289dd95efad99.zip
pfsense-463cefdb2c7b1698403186d0b2c289dd95efad99.tar.gz
Kill off old pftpx processes correctly
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r--etc/inc/config.inc24
1 files changed, 12 insertions, 12 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 81e0ad0..a60cfe3 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -1577,6 +1577,16 @@ function system_start_ftp_helpers() {
/* loop through all interfaces and handle pftpx */
$interface_counter = 0;
+ if(isset($config['shaper']['enable'])) {
+ if(isset($config['ezshaper']['step5']['p2pcatchall'])) {
+ $shaper_queue = "-q qP2PDown ";
+ } else {
+ $downq = "q" . convert_friendly_interface_to_friendly_descr($config['ezshaper']['step2']['inside_int']);
+ $shaper_queue = "-q {$downq}def ";
+ }
+ } else {
+ $shaper_queue = "";
+ }
foreach ($iflist as $ifent => $ifname) {
/* if the ftp proxy is disabled for this interface then kill pftpx
* instance and continue. note that the helpers for port forwards are
@@ -1593,7 +1603,7 @@ function system_start_ftp_helpers() {
* keep processing interfaces. kill pftpx if already
* running for this instance.
*/
- $helpers = exec("/bin/ps awux | grep \"/usr/local/sbin/pftpx -c {$port}\" | grep -v grep | sed \"s/ */ /g\" | cut -f2 -d\" \"");
+ $helpers = exec("/bin/ps awux | grep \"/usr/local/sbin/pftpx {$shaper_queue}-c {$port}\" | grep -v grep | sed \"s/ */ /g\" | cut -f2 -d\" \"");
if($helpers)
mwexec("/bin/kill {$helpers}");
$interface_counter++;
@@ -1626,18 +1636,8 @@ function system_start_ftp_helpers() {
log_error("Config: AON rule matched for interface {$ifname} - using FTP proxy");
}
}
- if(isset($config['shaper']['enable'])) {
- if(isset($config['ezshaper']['step5']['p2pcatchall'])) {
- $shaper_queue = "-q qP2PDown ";
- } else {
- $downq = "q" . convert_friendly_interface_to_friendly_descr($config['ezshaper']['step2']['inside_int']);
- $shaper_queue = "-q {$downq}def ";
- }
- } else {
- $shaper_queue = "";
- }
/* if pftpx is already running then do not launch it again */
- $helpers = exec("/bin/ps awux | grep \"/usr/local/sbin/pftpx -c {$port}\" | grep -v grep | sed \"s/ */ /g\"");
+ $helpers = exec("/bin/ps awux | grep \"/usr/local/sbin/pftpx {$shaper_queue}-c {$port}\" | grep -v grep | sed \"s/ */ /g\"");
if(!$helpers && $ip)
mwexec("/usr/local/sbin/pftpx {$shaper_queue}-c {$port} -g 8021 {$ip}");
if(!$ip)
OpenPOWER on IntegriCloud