Skip to content

Commit

Permalink
IIS: use 'config' folder within icingaweb root on windows
Browse files Browse the repository at this point in the history
fixes #8916
  • Loading branch information
grangeway authored and Al2Klimov committed Jun 11, 2015
1 parent 5b18ff7 commit 4607a85
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion library/Icinga/Application/ApplicationBootstrap.php
Expand Up @@ -138,7 +138,13 @@ protected function __construct($baseDir = null, $configDir = null)
if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) {
$configDir = $_SERVER['ICINGAWEB_CONFIGDIR'];
} 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);
Expand Down

0 comments on commit 4607a85

Please sign in to comment.