diff --git a/config/config.php b/config/config.php index 3610dda..9b5d550 100644 --- a/config/config.php +++ b/config/config.php @@ -71,6 +71,9 @@ switch (DISTRIBUTION) { define("CONFIGFILENAME", "ircddbgateway"); define("GATEWAYCONFIGPATH", CONFIGPATH . "/" . CONFIGFILENAME); +// set to called ircddbgateway-programm like ircddbgatewayd or ircddbgateway +define("IRCDDBGATEWAY", "ircddbgatewayd"); + // set time to refresh page define("REFRESHAFTER", "60"); diff --git a/include/functions.php b/include/functions.php index 49fec2b..6cd5b7f 100644 --- a/include/functions.php +++ b/include/functions.php @@ -6,8 +6,19 @@ function getMMDVMHostVersion() { if (file_exists($filename)) { return date("Y-m-d", filectime($filename)); } -} - +} + +function isProcessRunning($processname) { + exec("pgrep " . $processname, $pids); + if(empty($pids)) { + // process not running! + return false; + } else { + // process running! + return true; + } +} + function getMMDVMConfig() { // loads MMDVM.ini into array for further use $mmdvmconfigs = array(); @@ -49,7 +60,21 @@ function showMode($mode, $mmdvmconfigs) { ?>