IcingaConfig: load all enabled modules on CLI

This commit is contained in:
Thomas Gelf 2016-03-20 01:36:09 +01:00
parent 3e4d2b8626
commit cf534b6aa4
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,7 @@ namespace Icinga\Module\Director\IcingaConfig;
use Icinga\Application\Benchmark;
use Icinga\Application\Hook;
use Icinga\Application\Icinga;
use Icinga\Exception\IcingaException;
use Icinga\Exception\ProgrammingError;
use Icinga\Module\Director\Db;
@ -36,6 +37,9 @@ class IcingaConfig
public function __construct(Db $connection)
{
// Make sure module hooks are loaded:
Icinga::app()->getModuleManager()->loadEnabledModules();
$this->connection = $connection;
$this->db = $connection->getDbAdapter();
}