mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 08:14:03 +02:00
parent
8594dc068a
commit
e0f6ce36ea
@ -100,11 +100,15 @@ class ConfigCommand extends Command
|
|||||||
} catch (ProgrammingError $e) {
|
} catch (ProgrammingError $e) {
|
||||||
$this->fail($this->translate('Unknown type') . ': ' . $type);
|
$this->fail($this->translate('Unknown type') . ': ' . $type);
|
||||||
}
|
}
|
||||||
if (($path = $this->params->get('path', '/icingaweb')) === null) {
|
$path = $this->params->get('path', '/icingaweb');
|
||||||
$this->fail($this->translate('argument --path is mandatory.'));
|
if (! is_string($path) || strlen(trim($path)) === 0) {
|
||||||
|
$this->fail($this->translate('The argument --path expects a URL path'));
|
||||||
}
|
}
|
||||||
if (($documentRoot = $this->params->get('documentRoot', $webserver->getDocumentRoot())) === null) {
|
$documentRoot = $this->params->get('documentRoot', $webserver->getDocumentRoot());
|
||||||
$this->fail($this->translate('argument --publicPath is mandatory.'));
|
if (! is_string($documentRoot) || strlen(trim($documentRoot)) === 0) {
|
||||||
|
$this->fail($this->translate(
|
||||||
|
'The argument --documentRoot expects a directory from which the webserver will serve files'
|
||||||
|
));
|
||||||
}
|
}
|
||||||
$webserver->setWebPath($path);
|
$webserver->setWebPath($path);
|
||||||
$webserver->setDocumentRoot($documentRoot);
|
$webserver->setDocumentRoot($documentRoot);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user