wip: starts wazuh-agent service on successful registration, removed -no-parallel

This commit is contained in:
ts
2019-12-01 17:31:25 +00:00
parent dc17eb397e
commit 6a4c7a86a1
2 changed files with 5 additions and 10 deletions

View File

@@ -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

View File

@@ -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