mirror of
https://github.com/Retropex/apolloapi-v2.git
synced 2025-05-28 13:02:35 +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)
|
||||
return console.log('Bitcoin password found');
|
||||
else await utils.auth.changeNodeRpcPassword();
|
||||
else await utils.auth.changeNodeRpcPassword(settings);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ module.exports.auth = {
|
||||
exec(`echo 'futurebit:${password}' | sudo chpasswd`);
|
||||
},
|
||||
|
||||
async changeNodeRpcPassword() {
|
||||
async changeNodeRpcPassword(settings) {
|
||||
try {
|
||||
console.log('Generating and saving bitcoin password');
|
||||
|
||||
@ -63,7 +63,7 @@ module.exports.auth = {
|
||||
);
|
||||
|
||||
exec('sudo systemctl restart node');
|
||||
exec('sudo systemctl restart ckpool');
|
||||
if (settings?.nodeEnableSoloMining) exec('sudo systemctl restart ckpool');
|
||||
} catch (err) {
|
||||
console.log('ERR changeNodeRpcPassword', err);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user