Browse Source

test code for windows komodod under shepherd api

all-modes
Satinder Grewal 8 years ago
parent
commit
828816358b
  1. 11
      routes/shepherd.js

11
routes/shepherd.js

@ -1161,7 +1161,13 @@ shepherd.post('/setconf', function(req, res) {
console.log(req.body);
//console.log(req.body.chain);
setConf(req.body.chain);
if (os.platform() === 'win32' && req.body.chain == 'komodod') {
setkomodoconf = spawn(path.join(__dirname, '../assets/bin/win64/genkmdconf.bat'));
} else {
setConf(req.body.chain);
}
var obj = {
'msg': 'success',
'result': 'result'
@ -1507,12 +1513,15 @@ function setConf(flock) {
switch (flock) {
case 'komodod':
var DaemonConfPath = komodoDir + '/komodo.conf';
DaemonConfPath = path.normalize(DaemonConfPath);
break;
case 'zcashd':
var DaemonConfPath = ZcashDir + '/zcash.conf';
DaemonConfPath = path.normalize(DaemonConfPath);
break;
default:
var DaemonConfPath = komodoDir + '/' + flock + '/' + flock + '.conf';
DaemonConfPath = path.normalize(DaemonConfPath);
}
console.log(DaemonConfPath);

Loading…
Cancel
Save