summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-07-07 03:20:05 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-07-07 03:20:05 +0000
commitefb9942fd2e95accd3e66008bcfa3ab830623a2f (patch)
tree8b6aee7e61b7727c73dc20d724c86a1e70bd3cd8 /etc
parent2ab73e04d050c5b57f3b64cfbacc372c558bacf1 (diff)
downloadpfsense-efb9942fd2e95accd3e66008bcfa3ab830623a2f.zip
pfsense-efb9942fd2e95accd3e66008bcfa3ab830623a2f.tar.gz
Kill off old pftpx processes correctly
Diffstat (limited to 'etc')
-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 a878223..84047cf 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -1708,6 +1708,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
@@ -1724,7 +1734,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++;
@@ -1755,18 +1765,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