Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 1 | #!/usr/bin/env php |
| 2 | <?php |
| 3 | require_once __DIR__."/vendor/autoload.php"; |
| 4 | |
| 5 | use Monolog\Logger; |
| 6 | use LeeSherwood\Ejabberd\AuthenticationService; |
| 7 | use LeeSherwood\Ejabberd\CommandExecutors\mailcowCommandExecutor; |
| 8 | |
| 9 | $logger = new Logger('ejabberdAuth'); |
| 10 | |
| 11 | $stdoutHandler = new Monolog\Handler\StreamHandler('/var/www/authentication/auth.log', Logger::INFO); |
| 12 | |
| 13 | $logger->pushHandler($stdoutHandler); |
| 14 | |
| 15 | $executor = new mailcowCommandExecutor(); |
| 16 | |
| 17 | $application = new AuthenticationService($logger, $executor); |
| 18 | |
| 19 | $application->run(); |