mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 17:24:18 +02:00
IcingaConfig: load all enabled modules on CLI
This commit is contained in:
parent
3e4d2b8626
commit
cf534b6aa4
@ -4,6 +4,7 @@ namespace Icinga\Module\Director\IcingaConfig;
|
|||||||
|
|
||||||
use Icinga\Application\Benchmark;
|
use Icinga\Application\Benchmark;
|
||||||
use Icinga\Application\Hook;
|
use Icinga\Application\Hook;
|
||||||
|
use Icinga\Application\Icinga;
|
||||||
use Icinga\Exception\IcingaException;
|
use Icinga\Exception\IcingaException;
|
||||||
use Icinga\Exception\ProgrammingError;
|
use Icinga\Exception\ProgrammingError;
|
||||||
use Icinga\Module\Director\Db;
|
use Icinga\Module\Director\Db;
|
||||||
@ -36,6 +37,9 @@ class IcingaConfig
|
|||||||
|
|
||||||
public function __construct(Db $connection)
|
public function __construct(Db $connection)
|
||||||
{
|
{
|
||||||
|
// Make sure module hooks are loaded:
|
||||||
|
Icinga::app()->getModuleManager()->loadEnabledModules();
|
||||||
|
|
||||||
$this->connection = $connection;
|
$this->connection = $connection;
|
||||||
$this->db = $connection->getDbAdapter();
|
$this->db = $connection->getDbAdapter();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user