25 lines
478 B
PHP
Executable File
25 lines
478 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
require __DIR__ . '/vendor/autoload.php';
|
|
|
|
use MakerDave\ElasticPush\LogSource;
|
|
use Dotenv\Dotenv;
|
|
|
|
chdir(__DIR__);
|
|
|
|
$env = Dotenv::createImmutable(__DIR__);
|
|
$env->safeLoad();
|
|
|
|
foreach (new DirectoryIterator(__DIR__ . '/config') as $file) {
|
|
if ($file->isDot() || $file->isDir()) {
|
|
continue;
|
|
}
|
|
if ($file->getExtension() !== 'json') {
|
|
continue;
|
|
}
|
|
|
|
$worker = new LogSource($file->getPathname());
|
|
$worker->work();
|
|
}
|