From 802937ab363aff2493cfeb909a3afe319dc3c84d Mon Sep 17 00:00:00 2001 From: slerena Date: Wed, 9 Apr 2008 14:10:01 +0000 Subject: [PATCH] 2008-04-09 Sancho Lerena * Makefile.PL: Updated install for new servers. * bin/pandora_snmpconsole, pandora_export, pandora_recon, pandora_server: Fix problem with old daemonize call. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@799 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/Makefile.PL | 2 +- pandora_server/bin/pandora_export | 8 +++++++- pandora_server/bin/pandora_recon | 10 ++++++---- pandora_server/bin/pandora_server | 11 +++++++---- pandora_server/bin/pandora_snmpconsole | 11 ++++++----- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/pandora_server/Makefile.PL b/pandora_server/Makefile.PL index 9d54d44be8..ce0826e49e 100644 --- a/pandora_server/Makefile.PL +++ b/pandora_server/Makefile.PL @@ -20,7 +20,7 @@ WriteMakefile( SNMP => 0 }, EXE_FILES => -[ 'bin/pandora_server', 'bin/pandora_network', 'bin/pandora_recon', 'bin/pandora_snmpconsole'], +[ 'bin/pandora_server', 'bin/pandora_network', 'bin/pandora_recon', 'bin/pandora_snmpconsole' , 'bin/pandora_plugin', 'bin/pandora_export', 'bin/pandora_prediction'], PMLIBDIRS => [ 'lib' ], 'dist' => { 'TAR' => 'tar', 'TARFLAGS' => 'cvfz', 'SUFFIX' => '.gz', 'COMPRESS' => 'gzip'} diff --git a/pandora_server/bin/pandora_export b/pandora_server/bin/pandora_export index 00b5c89930..d57bfbf19d 100755 --- a/pandora_server/bin/pandora_export +++ b/pandora_server/bin/pandora_export @@ -52,6 +52,12 @@ pandora_loadconfig (\%pa_config, 7); # Audit server starting pandora_audit (\%pa_config, "Pandora FMS Export server starting", "SYSTEM", "System"); -print " [*] Starting up Export Server\n"; +# Daemonize and put in background +if ( $pa_config{"daemon"} eq "1" ){ + if ($pa_config{"quiet"} eq "0"){ + print " [*] Backgrounding Pandora FMS Export Server process.\n\n"; + } + &pandora_daemonize ( \%pa_config); +} die ("There is no more program yet! :-)"); diff --git a/pandora_server/bin/pandora_recon b/pandora_server/bin/pandora_recon index 61ee8823ba..1bf4280289 100755 --- a/pandora_server/bin/pandora_recon +++ b/pandora_server/bin/pandora_recon @@ -53,10 +53,12 @@ pandora_loadconfig (\%pa_config, 3); pandora_audit (\%pa_config, "Pandora FMS Recon Daemon starting", "SYSTEM", "System"); sleep(1); -# Daemonize of configured -if ( $pa_config{"daemon"} eq "1" ) { - print " [*] Backgrounding...\n"; - &daemonize; +# Daemonize and put in background +if ( $pa_config{"daemon"} eq "1" ){ + if ($pa_config{"quiet"} eq "0"){ + print " [*] Backgrounding Pandora FMS Recon Server process.\n\n"; + } + &pandora_daemonize ( \%pa_config); } # Runs main program (have a infinite loop inside) diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index 5b1c23d537..caafb7fd61 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -47,11 +47,14 @@ pandora_init(\%pa_config,"Pandora FMS Data Server"); pandora_loadconfig (\%pa_config,0); # Audit server starting -pandora_audit (\%pa_config, "Pandora FMS data server Daemon starting", "SYSTEM", "System"); +pandora_audit (\%pa_config, "Pandora FMS Data Server Daemon starting", "SYSTEM", "System"); -# BE CAREFUL, if you daemonize, you need to launch threads BEFORE daemonizing. -if ($pa_config{"daemon"} eq "1" ){ - &daemonize; +# Daemonize and put in background +if ( $pa_config{"daemon"} eq "1" ){ + if ($pa_config{"quiet"} eq "0"){ + print " [*] Backgrounding Pandora FMS Data Server process.\n\n"; + } + &pandora_daemonize ( \%pa_config); } # KeepAlive checks for Agents, only for master servers, in separate thread diff --git a/pandora_server/bin/pandora_snmpconsole b/pandora_server/bin/pandora_snmpconsole index 0208dab135..1a3a720c16 100755 --- a/pandora_server/bin/pandora_snmpconsole +++ b/pandora_server/bin/pandora_snmpconsole @@ -46,15 +46,16 @@ pandora_loadconfig (\%pa_config,2); # Audit server starting pandora_audit (\%pa_config, "Pandora Server SNMP Console Daemon starting", "SYSTEM", "System"); -# Daemonize of configured -if ( $pa_config{"daemon"} eq "1" ) { - print " [*] Backgrounding...\n"; - &daemonize; +# Daemonize and put in background +if ( $pa_config{"daemon"} eq "1" ){ + if ($pa_config{"quiet"} eq "0"){ + print " [*] Backgrounding Pandora FMS SNMP Console process.\n\n"; + } + &pandora_daemonize ( \%pa_config); } pandora_snmptrapd (\%pa_config); - ########################################################################## ## SUB pandora_snmptrapd ## Pandora SNMP Trap console/daemon subsystem