lokinet/llarp/service/config.cpp

22 lines
415 B
C++
Raw Normal View History

2018-12-15 16:21:52 +00:00
#include <service/config.hpp>
2019-01-11 01:19:36 +00:00
#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