Skip to content

Commit

Permalink
feat: if the wazuh.conf doesnt exist use defaults
Browse files Browse the repository at this point in the history
We need to improve this, but the current state of the code
makes it difficult for someone new to this project to
understand why the application crashes on startup.
  • Loading branch information
jr0me committed Aug 7, 2024
1 parent 7d3fdc9 commit 8032a22
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/agent/configuration_parser/src/configuration_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ namespace configuration
}
catch (const std::exception& e)
{
std::cout << "Error parsing wazuh.conf file: " << e.what() << std::endl;
throw;
std::cout << "Using localhost:8080 due to error parsing wazuh.conf file: " << e.what() << std::endl;

tbl = toml::parse_str(
R"([agent]
port = "8080"
manager_ip = "localhost")",
toml::spec::v(1, 0, 0));
}
}

Expand Down

0 comments on commit 8032a22

Please sign in to comment.