From d40c9a0b0113ed7121f0e24321e8db4dfdf85baa Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Mon, 25 Feb 2013 14:36:01 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7714 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/bin/pandora_server | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) 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;