re evaluate enterprise capabilities on configuration reload

This commit is contained in:
fbsanchez 2018-11-07 15:59:19 +01:00
parent 7407431343
commit df5e6daf7b
1 changed files with 9 additions and 2 deletions

View File

@ -667,9 +667,16 @@ sub main() {
} }
logger (\%Config, $Config{'rb_product_name'} . ' Server restarting (' . $@ . ') in 5 seconds.', 1); logger (\%Config, $Config{'rb_product_name'} . ' Server restarting (' . $@ . ') in 5 seconds.', 1);
# Re-initialize
pandora_init(\%Config, pandora_get_initial_product_name() . ' Server');
pandora_load_config (\%Config); pandora_load_config (\%Config);
if (enterprise_load (\%Config) == 0) {
$Config{'__enterprise_enabled'} = 0;
print_message (\%Config, " [*] Pandora FMS Enterprise module not available.", 1);
logger (\%Config, " [*] Pandora FMS Enterprise module not available.", 1);
} else {
$Config{'__enterprise_enabled'} = 1;
print_message (\%Config, " [*] " . pandora_get_initial_product_name() . " Enterprise module loaded.", 1);
logger (\%Config, " [*] " . pandora_get_initial_product_name() . " Enterprise module loaded.", 1);
}
pandora_restart (5); pandora_restart (5);
} }
$test_remote = 0; $test_remote = 0;