From 8cbd5064598ae0ae59e34364937e970d82ed6a03 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 16 Jan 2018 12:21:42 +0100 Subject: [PATCH] Make icingacli working without the setup module This enables users to install only the icingacli package refs #2705 --- library/Icinga/Application/ApplicationBootstrap.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php index 575df2272..8d658061d 100644 --- a/library/Icinga/Application/ApplicationBootstrap.php +++ b/library/Icinga/Application/ApplicationBootstrap.php @@ -460,10 +460,14 @@ abstract class ApplicationBootstrap { if (! @file_exists($this->config->resolvePath('authentication.ini'))) { $this->requiresSetup = true; - $this->moduleManager->loadModule('setup'); + if ($this->moduleManager->hasInstalled('setup')) { + $this->moduleManager->loadModule('setup'); + } } elseif ($this->setupTokenExists()) { // Load setup module but do not require setup - $this->moduleManager->loadModule('setup'); + if ($this->moduleManager->hasInstalled('setup')) { + $this->moduleManager->loadModule('setup'); + } } return $this; }