This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb5/admin/as_manager.inc

24 lines
347 B
PHP

<?php
function __isManagerRunning() {
global $aConfig;
$fName = $aConfig['ctrlPath'] . "/tickManager.pid";
if (!file_exists($fName)) {
return false;
}
$file = fopen($fName, "r");
$line = rtrim(fgets($file));
fclose($file);
list($pid, $time) = explode(" ", $line);
if (time() - $time > 22) {
return false;
}
return $pid;
}
?>