From 8f8f45080f0e63ce5a5288d05afc07fbcc1c4e0c Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 17 Apr 2013 18:01:49 +0000 Subject: [PATCH] 2013-04-17 Ramon Novoa * unix/pandora_agent: Empty the configuration hash before reloading the configuration. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8008 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/ChangeLog | 5 +++++ pandora_agents/unix/pandora_agent | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index a77e397b97..7cee71ef0b 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,8 @@ +2013-04-17 Ramon Novoa + + * unix/pandora_agent: Empty the configuration hash before reloading + the configuration. + 2013-04-15 Ramon Novoa * win32/pandora_windows_service.cc: Open the XML data file in binary diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 4a2e90a068..e77357e9ea 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -931,13 +931,16 @@ sub check_remote_config () { return if (recv_file ($RemoteConfFile) != 0); log_message ('remote config', 'Configuration has changed!'); + # Save the new configuration + move ("$Conf{'temporal'}/$RemoteConfFile", "$ConfDir/$ConfFile"); + # Empty modules, plugins and collections @Modules = (); @Plugins = (); %Collections = (); + %Conf = %DefaultConf; - # Save the new configuration and reload it - move ("$Conf{'temporal'}/$RemoteConfFile", "$ConfDir/$ConfFile"); + # Reload the new configuration read_config (); # Log file may have changed