summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthompsa <andy@fud.org.nz>2010-03-12 13:28:14 +1300
committerthompsa <andy@fud.org.nz>2010-03-12 13:28:14 +1300
commit6661ea2525eb3d43069ad01616f1f905be94029c (patch)
tree6204f74e3b753f7855757b955a8c361898116288
parentcae1b7db89f7cc46fb611701e8d261054903a3ad (diff)
downloadpfsense-6661ea2525eb3d43069ad01616f1f905be94029c.zip
pfsense-6661ea2525eb3d43069ad01616f1f905be94029c.tar.gz
Use procatat instead of ps as the latter always prints a header, also
use full paths.
-rw-r--r--etc/inc/service-utils.inc2
-rw-r--r--etc/inc/util.inc2
2 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index 7a0eccf..02b235c 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -146,7 +146,7 @@ function restart_service($name) {
function is_pid_running($pidfile) {
$pid = trim(file_get_contents($pidfile));
- $running = (trim(shell_exec("ps -p {$pid}")) != '');
+ $running = (trim(shell_exec("/usr/bin/procstat {$pid} 2>/dev/null")) != '');
return $running;
}
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 686810f..76dba77 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -50,7 +50,7 @@ function isvalidpid($pid) {
}
function is_process_running($process) {
- $running = (shell_exec("pgrep -x {$process}") != '');
+ $running = (shell_exec("/bin/pgrep -x {$process}") != '');
return $running;
}
OpenPOWER on IntegriCloud