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