mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 19:45:53 +00:00
Search /etc/opt/ripple for rippled.cfg
This commit is contained in:
@@ -265,11 +265,12 @@ void Config::setup (std::string const& strConf, bool bQuiet)
|
||||
CONFIG_FILE = CONFIG_DIR / strConfFile;
|
||||
dataDir = strXdgDataHome + "/" + systemName ();
|
||||
|
||||
boost::filesystem::create_directories (CONFIG_DIR, ec);
|
||||
|
||||
if (ec)
|
||||
Throw<std::runtime_error> (
|
||||
boost::str(boost::format ("Can not create %s") % CONFIG_DIR));
|
||||
if (!boost::filesystem::exists (CONFIG_FILE))
|
||||
{
|
||||
CONFIG_DIR = "/etc/opt/" + systemName ();
|
||||
CONFIG_FILE = CONFIG_DIR / strConfFile;
|
||||
dataDir = "/var/opt/" + systemName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user