diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-11-08 00:37:12 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-11-08 00:37:12 +0000 |
commit | b1f2356868d2f64059109c2daf0cfff6376fd984 (patch) | |
tree | d160349f0a1e199d96f33bc772e57679318e179b /etc/inc/config.inc | |
parent | 0c7b834e31d6160d434e806fcc468b2f0401b36d (diff) | |
download | pfsense-b1f2356868d2f64059109c2daf0cfff6376fd984.zip pfsense-b1f2356868d2f64059109c2daf0cfff6376fd984.tar.gz |
MFC 7463
FTP Proxy helper changes
Submitted-by: Dan Swartzendruber <dswartz_AT_druber.com>
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r-- | etc/inc/config.inc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index abc5d22..bdd58b4 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -1210,16 +1210,17 @@ function system_start_ftp_helpers() { * running for this instance. */ $helpers = exec("ps ax | grep \"/usr/local/sbin/pftpx -c {$port}\" | grep -v grep | sed \"s/ */ /g\" | cut -f2 -d\" \""); - mwexec("/usr/bin/kill {$helpers}"); + if($helpers) + mwexec("/bin/kill {$helpers}"); $interface_counter++; continue; } else { /* grab the current interface IP address */ $ip = find_interface_ip(convert_friendly_interface_to_real_interface_name($ifname)); /* if pftpx is already running then do not launch it again */ - $helpers = exec("ps ax | grep \"/usr/local/sbin/pftpx -c {$port}\" | grep -v grep | grep {$ip}"); - if(!$helpers) - mwexec("/usr/local/sbin/pftpx -c {$port} -g 8021 {$ip}"); + $helpers = exec("ps ax | grep \"/usr/local/sbin/pftpx -c {$port}\" | grep -v grep | sed \"s/ */ /g\""); + if(!$helpers && $ip) + mwexec("/usr/local/sbin/pftpx -c {$port} -g 8021 {$ip}"); $interface_counter++; } } |