1
0
This commit is contained in:
2022-09-01 18:49:32 +02:00
parent 3950ab7d36
commit af26fd4653
2 changed files with 26 additions and 1 deletions

View File

@ -59,6 +59,7 @@ if ($testMode)
$httpServerIp = "127.0.0.1";
}
require "/etc/moha/liste_telephones.php";
if (!init()) exit(1);
@ -112,13 +113,17 @@ function logger($level, $log, $pos = "", $device=null, $notif = true)
function init()
{
global $logFile, $logFh, $client;
global $logFile, $logFh, $client, $presence, $macAddresses;
date_default_timezone_set('Europe/Paris');
if (! $logFh = fopen($logFile, "w") )
{
echo _("error opening log file in ") . getcwd();
return false;
}
foreach($macAddresses as $key => $value)
{
$presence[$key] = false;
}
return true;
}