Improved the windows compatibility of some routes
This commit is contained in:
parent
8e8de1f706
commit
21cd55e54b
|
@ -648,6 +648,11 @@ function config_process_config () {
|
|||
exit;
|
||||
}
|
||||
|
||||
$is_windows = false;
|
||||
if (substr(strtolower(PHP_OS), 0, 3) === 'win') {
|
||||
$is_windows = true;
|
||||
}
|
||||
|
||||
/* Compatibility fix */
|
||||
foreach ($configs as $c) {
|
||||
$config[$c['token']] = $c['value'];
|
||||
|
@ -663,6 +668,15 @@ function config_process_config () {
|
|||
}
|
||||
}
|
||||
|
||||
if (!isset ($config['remote_config'])) {
|
||||
if ($is_windows)
|
||||
$default = 'C:\\PandoraFMS\\Pandora_Server\\data_in';
|
||||
else
|
||||
$default = '/var/spool/pandora/data_in';
|
||||
|
||||
config_update_value ('remote_config', $default);
|
||||
}
|
||||
|
||||
if (!isset ($config['date_format'])) {
|
||||
config_update_value ('date_format', 'F j, Y, g:i a');
|
||||
}
|
||||
|
@ -821,7 +835,12 @@ function config_process_config () {
|
|||
}
|
||||
|
||||
if (!isset ($config["log_dir"])) {
|
||||
config_update_value ('log_dir', '/var/spool/pandora/data_in/log');
|
||||
if ($is_windows)
|
||||
$default = 'C:\\PandoraFMS\\Pandora_Server\\data_in\\log';
|
||||
else
|
||||
$default = '/var/spool/pandora/data_in/log';
|
||||
|
||||
config_update_value ('log_dir', $default);
|
||||
}
|
||||
|
||||
if (!isset ($config["log_max_lifetime"])) {
|
||||
|
@ -963,7 +982,12 @@ function config_process_config () {
|
|||
}
|
||||
|
||||
if (!isset ($config['netflow_path'])) {
|
||||
config_update_value ( 'netflow_path', '/var/spool/pandora/data_in/netflow');
|
||||
if ($is_windows)
|
||||
$default = 'C:\\PandoraFMS\\Pandora_Server\\data_in\\netflow';
|
||||
else
|
||||
$default = '/var/spool/pandora/data_in/netflow';
|
||||
|
||||
config_update_value ( 'netflow_path', $default);
|
||||
}
|
||||
|
||||
if (!isset ($config['netflow_interval'])) {
|
||||
|
|
Loading…
Reference in New Issue