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