Bendr0id / xmrigCC

RandomX, CryptoNight, Argon2 and GhostRider CPU/GPU miner with Command&Control (CC) Server and Monitoring
GNU General Public License v3.0
311 stars 108 forks source link

Problem with overriding some embedded config options. #386

Closed PsychoSec2 closed 2 years ago

PsychoSec2 commented 2 years ago

So I'm compiling xmrigCC with an embedded config, it works as expected. However, I have a few miners that require a couple of config options which differ from the embedded config. The way I that would expect to do this is by: creating a config.json file which overrides only the options that I would like changed while keeping the other options that are within the embedded config running and in tact. I tried doing this and it did not work. So my question is how can I make this work? If xmrigCC dose not have this feature then it is something I think should be added.

PsychoSec2 commented 2 years ago

Nvm solved the issue by passing environmental variables to the options a wanted to change.

For example line 101 in CCClient.cpp:

94    std::string clientId;
95    if (m_base->config()->ccClient().workerId())
96    {
97    clientId = Env::expand(m_base->config()->ccClient().workerId());
98    }
99    else
100   {    
101   clientId = getenv("worker_id");
102   }
Bendr0id commented 2 years ago

Yes, that's the only working approach. There is currently no config merging Happening.

Regards, Ben