bootstrap: Load setup module in case the setup token exists

The web setup may write the config.ini even if it errors. Thus our bootstrap
has to load the setup module whenever the setup.token exists.
Another approach would to write the config.ini in our web setup at the very end.
This commit is contained in:
Eric Lippmann 2015-01-23 15:27:43 +01:00
parent 7500dd9c68
commit 7bd42b476f
1 changed files with 4 additions and 1 deletions

View File

@ -401,7 +401,7 @@ abstract class ApplicationBootstrap
}
/**
* Load the setup module if Icinga Web 2 requires setup
* Load the setup module if Icinga Web 2 requires setup or the setup token exists
*
* @return $this
*/
@ -410,6 +410,9 @@ abstract class ApplicationBootstrap
if (! @file_exists($this->config->resolvePath('config.ini'))) {
$this->requiresSetup = true;
$this->moduleManager->loadModule('setup');
} elseif ($this->setupTokenExists()) {
// Load setup module but do not require setup
$this->moduleManager->loadModule('setup');
}
return $this;
}