You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/llarp/service/config.cpp

22 lines
415 B
C++

#include <service/config.hpp>
#include <util/ini.hpp>
namespace llarp
{
namespace service
{
bool
Config::Load(const std::string& fname)
{
ini::Parser parser(fname);
for(const auto& sec : parser.top().ordered_sections)
{
services.push_back({sec->first, sec->second.values});
}
return services.size() > 0;
}
} // namespace service
} // namespace llarp