Update Process class and use APP_ID instead of hardcoded config name for #1925
This commit is contained in:
parent
e295a938f8
commit
eb95d0339e
7 changed files with 110 additions and 36 deletions
|
@ -41,6 +41,7 @@
|
|||
#include "base/net/tools/NetBuffer.h"
|
||||
#include "core/config/Config.h"
|
||||
#include "core/config/ConfigTransform.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
#ifdef HAVE_SYSLOG_H
|
||||
|
@ -132,19 +133,16 @@ private:
|
|||
}
|
||||
|
||||
chain.addFile(Process::location(Process::DataLocation, "config.json"));
|
||||
|
||||
if (read(chain, config)) {
|
||||
return config.release();
|
||||
}
|
||||
|
||||
chain.addFile(Process::location(Process::HomeLocation, ".xmrig.json"));
|
||||
|
||||
chain.addFile(Process::location(Process::HomeLocation, "." APP_ID ".json"));
|
||||
if (read(chain, config)) {
|
||||
return config.release();
|
||||
}
|
||||
|
||||
chain.addFile(Process::location(Process::HomeLocation, ".config/xmrig.json"));
|
||||
|
||||
chain.addFile(Process::location(Process::HomeLocation, ".config" XMRIG_DIR_SEPARATOR APP_ID ".json"));
|
||||
if (read(chain, config)) {
|
||||
return config.release();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue