diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 5b4f18c90c..54879ab152 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2013-02-25 Ramon Novoa + + * bin/pandora_server: Delay the backgrounding of the main process to + make log messages available when starting from the init script. + 2013-02-25 Miguel de Dios * lib/PandoraFMS/Core.pm: erased the spam traces (useful for the diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index fd0ac8d307..9b820ef916 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -266,12 +266,6 @@ if (enterprise_load (\%Config) == 0) { print_message (\%Config, " [*] Pandora FMS Enterprise module loaded.", 1); } -# Daemonize and put in background -if ($Config{'daemon'} == 1) { - print_message (\%Config, " [*] Backgrounding Pandora FMS Server process.\n", 1); - pandora_daemonize (\%Config); -} - if (enterprise_load (\%Config) != 0) { if($Config{'policy_manager'} == 1) { # Start thread to patrol policy queue @@ -292,6 +286,12 @@ foreach my $server (@Servers) { $server->upEvent (); } +# Daemonize and put in background +if ($Config{'daemon'} == 1) { + print_message (\%Config, " [*] Backgrounding Pandora FMS Server process.\n", 1); + pandora_daemonize (\%Config); +} + # Main loop my $time_ref = time (); my $counter = 0;