relocating function isProcessRunning to tools.php

This commit is contained in:
dg9vh 2016-05-15 21:03:52 +00:00
parent 54fbbca310
commit 2e6778a27a
2 changed files with 11 additions and 11 deletions

View file

@ -19,17 +19,6 @@ function getMMDVMHostFileVersion() {
} }
} }
function isProcessRunning($processname) {
exec("pgrep " . $processname, $pids);
if(empty($pids)) {
// process not running!
return false;
} else {
// process running!
return true;
}
}
function getMMDVMConfig() { function getMMDVMConfig() {
// loads MMDVM.ini into array for further use // loads MMDVM.ini into array for further use
$mmdvmconfigs = array(); $mmdvmconfigs = array();

View file

@ -33,4 +33,15 @@ function getMHZ($freq) {
return substr($freq,0,3) . "." . substr($freq,3,3) . "." . substr($freq,6) . " Mhz"; return substr($freq,0,3) . "." . substr($freq,3,3) . "." . substr($freq,6) . " Mhz";
} }
function isProcessRunning($processname) {
exec("pgrep " . $processname, $pids);
if(empty($pids)) {
// process not running!
return false;
} else {
// process running!
return true;
}
}
?> ?>