Display an error message when enabled modules cannot be read because /etc/icingaweb2 is not readable
resolves #9141
This commit is contained in:
parent
d3964a31fb
commit
9393d11c0b
|
@ -101,6 +101,16 @@ class Manager
|
||||||
*/
|
*/
|
||||||
private function detectEnabledModules()
|
private function detectEnabledModules()
|
||||||
{
|
{
|
||||||
|
if (false === file_exists($parent = dirname($this->enableDir))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (false === is_readable($parent)) {
|
||||||
|
throw new NotReadableError(
|
||||||
|
'Cannot read enabled modules. Module directory\'s parent directory "%s" is not readable',
|
||||||
|
$parent
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (! file_exists($this->enableDir)) {
|
if (! file_exists($this->enableDir)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue