2021-02-11 22:24:49 +08:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
require_once __DIR__."/vendor/autoload.php";
|
|
|
|
|
|
|
|
use Monolog\Logger;
|
|
|
|
use LeeSherwood\Ejabberd\AuthenticationService;
|
|
|
|
use LeeSherwood\Ejabberd\CommandExecutors\mailcowCommandExecutor;
|
|
|
|
|
|
|
|
$logger = new Logger('ejabberdAuth');
|
|
|
|
|
2021-05-06 19:56:05 +08:00
|
|
|
$stdoutHandler = new Monolog\Handler\StreamHandler('/var/www/authentication/auth.log', Logger::INFO);
|
2021-02-11 22:24:49 +08:00
|
|
|
|
|
|
|
$logger->pushHandler($stdoutHandler);
|
|
|
|
|
|
|
|
$executor = new mailcowCommandExecutor();
|
|
|
|
|
|
|
|
$application = new AuthenticationService($logger, $executor);
|
|
|
|
|
|
|
|
$application->run();
|