Browse Source

addcoin bug fix

v0.25
pbca26 7 years ago
parent
commit
e670de09ae
  1. 22
      routes/shepherd/daemonControl.js
  2. 15
      routes/shepherd/quitDaemon.js

22
routes/shepherd/daemonControl.js

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

15
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(() => {
setTimeout(() => { shepherd.killRogueProcess(key === 'CHIPS' ? 'chips-cli' : 'komodo-cli');
shepherd.killRogueProcess('chips-cli'); }, 100);
}, 100);
} else {
setTimeout(() => {
shepherd.killRogueProcess('komodo-cli');
}, 100);
}
}); });
} }

Loading…
Cancel
Save