summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorseth <seth@mx3.arosa.nl>2009-03-09 15:39:53 +0100
committerseth <seth@mx3.arosa.nl>2009-03-09 15:39:53 +0100
commitb491abc1d2512991bf1d9f83f9694d6a1c2a1be1 (patch)
treed29a4bc30288e69f641c30ea10103d508972c334
parentb3b5c1884cbf9d7fb4673bbe57d07b25fcc39d10 (diff)
downloadpfsense-b491abc1d2512991bf1d9f83f9694d6a1c2a1be1.zip
pfsense-b491abc1d2512991bf1d9f83f9694d6a1c2a1be1.tar.gz
Fix ftp-proxy check for running processes
-rw-r--r--etc/inc/config.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 8dd9243..644df64 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -2834,7 +2834,7 @@ function system_start_ftp_helpers() {
if($g['debug'])
log_error("Config: FTP proxy disabled for interface {$ifent}");
- exec("/bin/ps awux | /usr/bin/grep ftp-proxy | /usr/bin/grep {$port} | /usr/bin/grep -v grep | /usr/bin/awk '{ print $2 }'", $helpers);
+ exec("/bin/ps awwux | /usr/bin/grep "[/]ftp-proxy | /usr/bin/grep {$port} | /usr/bin/awk '{ print $2 }'", $helpers);
if(count($helpers[0]) > 0)
mwexec("/bin/kill {$helpers[0]}");
$interface_counter++;
@@ -2875,7 +2875,7 @@ function system_start_ftp_helpers() {
/* if ftp-proxy is already running then do not launch it again */
if($g['debug'])
log_error("Config: FTP proxy port ($port) enabled for interface {$ifname}");
- $helpers = exec("/bin/ps awux | /usr/bin/grep ftp-proxy | /usr/bin/grep {$port} | /usr/bin/grep -v grep | sed \"s/ */ /g\"");
+ exec("/bin/ps awwux | /usr/bin/grep "[/]ftp-proxy | /usr/bin/grep {$port} | /usr/bin/grep "{$pftpxsourceaddr}" | /usr/bin/awk '{ print $2 }'", $helpers);
if(!$helpers && $ip)
mwexec("/usr/local/sbin/ftp-proxy {$shaper_queue} -p {$port} {$pftpxsourceaddr} {$ip} -T PFFTPPROXY");
if(!$ip)
OpenPOWER on IntegriCloud