From 815af8fbb4bed02738adb2f1ce12b87e4f25ac60 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Wed, 22 Jun 2005 19:34:27 +0000 Subject: ps a -> ps ax --- etc/inc/service-utils.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc/inc/service-utils.inc') diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index aba47bd..918d89f 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -56,6 +56,7 @@ function write_rcfile($params) { $fout = fopen($fileprefix . $params['file'], "w"); fwrite($fout, $towrite); fclose($fout); + chmod($fileprefix . $params['file'], 0755); return; } @@ -125,7 +126,7 @@ function restart_service($name) { function is_service_running($service, $ps = "") { global $config; if(!$ps) { - exec("/bin/ps a | awk '{ print $5 }'", $psout); + exec("/bin/ps ax | awk '{ print $5 }'", $psout); array_shift($psout); foreach($psout as $line) { $ps[] = trim(array_pop(explode(' ', array_pop(explode('/', $line))))); -- cgit v1.1