From cf534b6aa46e2e27a8540dd7026205fc1f97fbba Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 20 Mar 2016 01:36:09 +0100 Subject: [PATCH] IcingaConfig: load all enabled modules on CLI --- library/Director/IcingaConfig/IcingaConfig.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/Director/IcingaConfig/IcingaConfig.php b/library/Director/IcingaConfig/IcingaConfig.php index 06e8a0b8..053443c0 100644 --- a/library/Director/IcingaConfig/IcingaConfig.php +++ b/library/Director/IcingaConfig/IcingaConfig.php @@ -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(); }