diff --git a/modules/utilities/unix/logging/wazuh/templates/wazuh-register.rb.erb b/modules/utilities/unix/logging/wazuh/templates/wazuh-register.rb.erb index 4f5dfab6e..ba11a0cc2 100644 --- a/modules/utilities/unix/logging/wazuh/templates/wazuh-register.rb.erb +++ b/modules/utilities/unix/logging/wazuh/templates/wazuh-register.rb.erb @@ -8,15 +8,10 @@ def already_registered? end until already_registered? - if already_registered? - # disable service - # sleep(100) - else - stdout, _, _= Open3.capture3("/var/ossec/bin/agent-auth -m <%= @kibana_elasticsearch_ip -%> -A '<%= @agent_name -%>'") - - if stdout.include? 'Valid key created. Finished' - FileUtils.touch @registered_file - end + stdout, _, _ = Open3.capture3("/var/ossec/bin/agent-auth -m <%= @kibana_elasticsearch_ip -%> -A '<%= @agent_name -%>'") + if stdout.include? 'Valid key created. Finished' + FileUtils.touch @registered_file + `service wazuh-agent start` end sleep(15) end diff --git a/secgen.rb b/secgen.rb index aabd6074e..bdfffdbe7 100644 --- a/secgen.rb +++ b/secgen.rb @@ -114,7 +114,7 @@ def build_vms(scenario, project_dir, options) Print.info "Building project: #{project_dir}" system = '' - command = 'up --no-parallel' + command = 'up' if options.has_key? :system system = options[:system] end