IIS: use 'config' folder within icingaweb root on windows

fixes #8916
This commit is contained in:
Paul Richards 2015-03-30 23:09:24 +01:00 committed by Alexander A. Klimov
parent 5b18ff7965
commit 4607a85cf5
1 changed files with 7 additions and 1 deletions

View File

@ -138,7 +138,13 @@ abstract class ApplicationBootstrap
if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) { if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) {
$configDir = $_SERVER['ICINGAWEB_CONFIGDIR']; $configDir = $_SERVER['ICINGAWEB_CONFIGDIR'];
} else { } else {
$configDir = '/etc/icingaweb2'; // default configuration path. Use /etc/icingaweb2 on linux
// For config on windows - use config folder within php code
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$configDir = $baseDir . '/config';
} else {
$configDir = '/etc/icingaweb2';
}
} }
} }
$canonical = realpath($configDir); $canonical = realpath($configDir);