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.writeLog(`getconf flock: ${flock}`);
switch (shepherd.os.platform()) {
case 'darwin':
nativeCoindDir = `${process.env.HOME}/Library/Application Support/${shepherd.nativeCoindList[coind.toLowerCase()].bin}`;
break;
case 'linux':
nativeCoindDir = coind ? `${process.env.HOME}/.${shepherd.nativeCoindList[coind.toLowerCase()].bin.toLowerCase()}` : null;
break;
case 'win32':
nativeCoindDir = coind ? `${process.env.APPDATA}/${shepherd.nativeCoindList[coind.toLowerCase()].bin}` : null;
break;
if (coind) {
switch (shepherd.os.platform()) {
case 'darwin':
nativeCoindDir = `${process.env.HOME}/Library/Application Support/${shepherd.nativeCoindList[coind.toLowerCase()].bin}`;
break;
case 'linux':
nativeCoindDir = coind ? `${process.env.HOME}/.${shepherd.nativeCoindList[coind.toLowerCase()].bin.toLowerCase()}` : null;
break;
case 'win32':
nativeCoindDir = coind ? `${process.env.APPDATA}/${shepherd.nativeCoindList[coind.toLowerCase()].bin}` : null;
break;
}
}
switch (flock) {

15
routes/shepherd/quitDaemon.js

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

Loading…
Cancel
Save