mirror of
https://github.com/Retropex/apolloapi-v2.git
synced 2025-06-02 15:32:30 +02:00
Fix ckpool doesn’t need restart if not enabled
This commit is contained in:
parent
c5ff3622ea
commit
c01fbee47a
@ -49,7 +49,7 @@ const runGenerateBitcoinPassword = async (settings) => {
|
|||||||
|
|
||||||
if (settings && settings.nodeRpcPassword)
|
if (settings && settings.nodeRpcPassword)
|
||||||
return console.log('Bitcoin password found');
|
return console.log('Bitcoin password found');
|
||||||
else await utils.auth.changeNodeRpcPassword();
|
else await utils.auth.changeNodeRpcPassword(settings);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ module.exports.auth = {
|
|||||||
exec(`echo 'futurebit:${password}' | sudo chpasswd`);
|
exec(`echo 'futurebit:${password}' | sudo chpasswd`);
|
||||||
},
|
},
|
||||||
|
|
||||||
async changeNodeRpcPassword() {
|
async changeNodeRpcPassword(settings) {
|
||||||
try {
|
try {
|
||||||
console.log('Generating and saving bitcoin password');
|
console.log('Generating and saving bitcoin password');
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ module.exports.auth = {
|
|||||||
);
|
);
|
||||||
|
|
||||||
exec('sudo systemctl restart node');
|
exec('sudo systemctl restart node');
|
||||||
exec('sudo systemctl restart ckpool');
|
if (settings?.nodeEnableSoloMining) exec('sudo systemctl restart ckpool');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log('ERR changeNodeRpcPassword', err);
|
console.log('ERR changeNodeRpcPassword', err);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user