mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add support for CLI option --conf.
This commit is contained in:
@@ -82,7 +82,7 @@ int main(int argc, char* argv[])
|
||||
po::options_description desc("Options");
|
||||
desc.add_options()
|
||||
("help,h", "Display this message.")
|
||||
("conf", "Specify the configuration file.")
|
||||
("conf", po::value<std::string>(), "Specify the configuration file.")
|
||||
("rpc", "Perform rpc command (default).")
|
||||
("test,t", "Perform unit tests.")
|
||||
("parameters", po::value< vector<string> >(), "Specify comma separated parameters.")
|
||||
@@ -95,7 +95,6 @@ int main(int argc, char* argv[])
|
||||
//
|
||||
// Prepare to run
|
||||
//
|
||||
theConfig.load();
|
||||
|
||||
if (!AddSystemEntropy())
|
||||
{
|
||||
@@ -127,6 +126,11 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (!iResult)
|
||||
{
|
||||
theConfig.setup(vm.count("conf") ? vm["conf"].as<std::string>() : "");
|
||||
}
|
||||
|
||||
if (iResult)
|
||||
{
|
||||
nothing();
|
||||
|
||||
Reference in New Issue
Block a user