mirror of
https://github.com/Retropex/apolloapi-v2.git
synced 2025-05-16 21:20:50 +02:00
Fix pool settings config
This commit is contained in:
parent
1910eb9364
commit
96d7e788da
@ -72,9 +72,11 @@ const generate = async function (pools = null, settings = null ) {
|
||||
const fanLow = (settings.fan_low && settings.fan_low !== 40) ? `-fan_temp_low ${settings.fan_low}` : null;
|
||||
const fanHigh = (settings.fan_high && settings.fan_high !== 60) ? `-fan_temp_hi ${settings.fan_high}` : null;
|
||||
|
||||
const poolUrl = new URL(mainPool.url);
|
||||
const poolUrl = mainPool.url.replace(/^.*\/\//, '');
|
||||
|
||||
let minerConfig = `-host ${poolUrl.hostname} -port ${poolUrl.port} -user ${mainPool.username} -brd_ocp ${voltage} -osc ${frequency}`;
|
||||
const [poolHost, poolPort] = poolUrl.split(':');
|
||||
|
||||
let minerConfig = `-host ${poolHost} -port ${poolPort} -user ${mainPool.username} -brd_ocp ${voltage} -osc ${frequency}`;
|
||||
if (fanLow) minerConfig += ` ${fanLow}`;
|
||||
if (fanHigh) minerConfig += ` ${fanHigh}`;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user