Browse Source

kmd rpcbind -> rpcport

pkg_automation_electrum
pbca26 7 years ago
parent
commit
4fc45ee294
  1. 38
      routes/shepherd/daemonControl.js

38
routes/shepherd/daemonControl.js

@ -655,26 +655,28 @@ module.exports = (shepherd) => {
}); });
} }
const rpcbind = () => { const rpcport = () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const result = 'checking rpcbind...'; const result = 'checking rpcport...';
if (status[0].hasOwnProperty('rpcbind')) { if (flock === 'komodod') {
shepherd.log('rpcbind: OK'); if (status[0].hasOwnProperty('rpcport')) {
shepherd.writeLog('rpcbind: OK'); shepherd.log('rpcport: OK');
} else { shepherd.writeLog('rpcport: OK');
shepherd.log('rpcbind: NOT FOUND'); } else {
shepherd.writeLog('rpcbind: NOT FOUND'); shepherd.log('rpcport: NOT FOUND');
shepherd.writeLog('rpcport: NOT FOUND');
fs.appendFile(DaemonConfPath, '\nrpcbind=127.0.0.1', (err) => { fs.appendFile(DaemonConfPath, '\rpcport=7771', (err) => {
if (err) { if (err) {
shepherd.writeLog(`append daemon conf err: ${err}`); shepherd.writeLog(`append daemon conf err: ${err}`);
shepherd.log(`append daemon conf err: ${err}`); shepherd.log(`append daemon conf err: ${err}`);
} }
// throw err; // throw err;
shepherd.log('rpcbind: ADDED'); shepherd.log('rpcport: ADDED');
shepherd.writeLog('rpcbind: ADDED'); shepherd.writeLog('rpcport: ADDED');
}); });
}
} }
resolve(result); resolve(result);
@ -764,7 +766,7 @@ module.exports = (shepherd) => {
return rpcpass(); return rpcpass();
}) })
.then(server) .then(server)
.then(rpcbind) .then(rpcport)
.then(addnode); .then(addnode);
}); });

Loading…
Cancel
Save