Project

General

Profile

« Previous | Next » 

Revision 6661ea25

Added by Andrew Thompson over 15 years ago

Use procatat instead of ps as the latter always prints a header, also
use full paths.

View differences:

etc/inc/service-utils.inc
146 146

  
147 147
function is_pid_running($pidfile) {
148 148
	$pid = trim(file_get_contents($pidfile));
149
	$running = (trim(shell_exec("ps -p {$pid}")) != '');
149
	$running = (trim(shell_exec("/usr/bin/procstat {$pid} 2>/dev/null")) != '');
150 150
	return $running;
151 151
}
152 152

  

Also available in: Unified diff