mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-03 17:35:51 +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;
|
CONFIG_FILE = CONFIG_DIR / strConfFile;
|
||||||
dataDir = strXdgDataHome + "/" + systemName ();
|
dataDir = strXdgDataHome + "/" + systemName ();
|
||||||
|
|
||||||
boost::filesystem::create_directories (CONFIG_DIR, ec);
|
if (!boost::filesystem::exists (CONFIG_FILE))
|
||||||
|
{
|
||||||
if (ec)
|
CONFIG_DIR = "/etc/opt/" + systemName ();
|
||||||
Throw<std::runtime_error> (
|
CONFIG_FILE = CONFIG_DIR / strConfFile;
|
||||||
boost::str(boost::format ("Can not create %s") % CONFIG_DIR));
|
dataDir = "/var/opt/" + systemName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user