Add checking for config files in user home directory

Check for configuration files in the home directory to make packaging XMRig for Linux easier.
This commit is contained in:
Emily Roberts 2020-11-01 16:17:23 -07:00 committed by GitHub
parent 4c5421b2bf
commit bccffa63a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,6 +136,18 @@ private:
if (read(chain, config)) {
return config.release();
}
chain.addFile(Process::location(Process::HomeLocation, ".xmrig.json"));
if (read(chain, config)) {
return config.release();
}
chain.addFile(Process::location(Process::HomeLocation, ".config/xmrig.json"));
if (read(chain, config)) {
return config.release();
}
# ifdef XMRIG_FEATURE_EMBEDDED_CONFIG
chain.addRaw(default_config);