From 6a3464b7b8d999b5027da98b587c73b0cf1bcffa Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 13 Nov 2005 00:13:23 +0000 Subject: Use ps awux --- etc/inc/config.inc | 4 ++-- etc/inc/service-utils.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'etc') diff --git a/etc/inc/config.inc b/etc/inc/config.inc index a3ce8a8..2c2ad25 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -1209,7 +1209,7 @@ function system_start_ftp_helpers() { * keep processing interfaces. kill pftpx if already * running for this instance. */ - $helpers = exec("ps ax | grep \"/usr/local/sbin/pftpx -c {$port}\" | grep -v grep | sed \"s/ */ /g\" | cut -f2 -d\" \""); + $helpers = exec("ps awux | grep \"/usr/local/sbin/pftpx -c {$port}\" | grep -v grep | sed \"s/ */ /g\" | cut -f2 -d\" \""); if($helpers) mwexec("/bin/kill {$helpers}"); $interface_counter++; @@ -1217,7 +1217,7 @@ function system_start_ftp_helpers() { /* 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 | sed \"s/ */ /g\""); + $helpers = exec("ps awux | 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++; diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index f5add0c..acd3958 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -125,7 +125,7 @@ function restart_service($name) { } function is_process_running($process) { - $status = `/bin/ps ax | /usr/bin/grep {$process} | grep -v grep | wc -l`; + $status = `/bin/ps awux | /usr/bin/grep {$process} | grep -v grep | wc -l`; if($status > 0) return 1; return 0; } -- cgit v1.1