Search /etc/opt/ripple for rippled.cfg

This commit is contained in:
seelabs
2015-12-04 15:43:22 -05:00
committed by Nik Bougalis
parent e19e6c6b0a
commit 469d5494ea

View File

@@ -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();
}
}
}