Browse Source

Merge pull request #214 from SuperNETorg/electrum

addcoin bug fix
pkg_automation_electrum
pbca26 7 years ago
committed by GitHub
parent
commit
42a6082a59
  1. 2
      routes/shepherd/daemonControl.js
  2. 11
      routes/shepherd/quitDaemon.js

2
routes/shepherd/daemonControl.js

@ -11,6 +11,7 @@ module.exports = (shepherd) => {
shepherd.log(`getconf coind ${coind}`); shepherd.log(`getconf coind ${coind}`);
shepherd.writeLog(`getconf flock: ${flock}`); shepherd.writeLog(`getconf flock: ${flock}`);
if (coind) {
switch (shepherd.os.platform()) { switch (shepherd.os.platform()) {
case 'darwin': case 'darwin':
nativeCoindDir = `${process.env.HOME}/Library/Application Support/${shepherd.nativeCoindList[coind.toLowerCase()].bin}`; nativeCoindDir = `${process.env.HOME}/Library/Application Support/${shepherd.nativeCoindList[coind.toLowerCase()].bin}`;
@ -22,6 +23,7 @@ module.exports = (shepherd) => {
nativeCoindDir = coind ? `${process.env.APPDATA}/${shepherd.nativeCoindList[coind.toLowerCase()].bin}` : null; nativeCoindDir = coind ? `${process.env.APPDATA}/${shepherd.nativeCoindList[coind.toLowerCase()].bin}` : null;
break; break;
} }
}
switch (flock) { switch (flock) {
case 'komodod': case 'komodod':

11
routes/shepherd/quitDaemon.js

@ -19,7 +19,8 @@ module.exports = (shepherd) => {
const execCliStop = () => { const execCliStop = () => {
let _arg = []; let _arg = [];
if (chain && !shepherd.nativeCoindList[key.toLowerCase()] && key !== 'CHIPS') { if (chain &&
!shepherd.nativeCoindList[key.toLowerCase()] && key !== 'CHIPS') {
_arg.push(`-ac_name=${chain}`); _arg.push(`-ac_name=${chain}`);
if (shepherd.appConfig.dataDir.length) { if (shepherd.appConfig.dataDir.length) {
@ -59,15 +60,9 @@ module.exports = (shepherd) => {
shepherd.log(`exec error: ${error}`); shepherd.log(`exec error: ${error}`);
} }
if (key === 'CHIPS') {
setTimeout(() => {
shepherd.killRogueProcess('chips-cli');
}, 100);
} else {
setTimeout(() => { setTimeout(() => {
shepherd.killRogueProcess('komodo-cli'); shepherd.killRogueProcess(key === 'CHIPS' ? 'chips-cli' : 'komodo-cli');
}, 100); }, 100);
}
}); });
} }

Loading…
Cancel
Save