Browse Source

Merge pull request #111 from pbca26/master

app
all-modes
pbca26 8 years ago
committed by GitHub
parent
commit
f6b43fc7f6
  1. 4
      main.js
  2. 34
      routes/shepherd.js

4
main.js

@ -58,6 +58,8 @@ var appConfig = shepherd.loadLocalConfig(); // load app config
shepherd.writeLog('app started in ' + (appConfig.dev ? 'dev mode' : ' user mode'));
shepherd.setConfKMD();
if (appConfig.killIguanaOnStart) {
var iguanaGrep;
@ -357,7 +359,7 @@ function createWindow (status) {
if (appConfig.edexGuiOnly) {
if (appConfig.v2) {
shepherd.writeLog('show edex gui');
mainWindow.loadURL('http://127.0.0.1:3000');
mainWindow.loadURL('http://127.0.0.1:3000');
//mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.iguanaAppPort + '/gui/EasyDEX-GUI/react/build');
} else {
shepherd.writeLog('show edex gui');

34
routes/shepherd.js

@ -1067,7 +1067,9 @@ function herder(flock, data) {
console.log('exec' + komododBin + ' ' + data.ac_options.join(' '));
shepherd.writeLog('exec' + komododBin + ' ' + data.ac_options.join(' '));
exec(komododBin + ' ' + data.ac_options.join(' '), function(error, stdout, stderr) {
exec(komododBin + ' ' + data.ac_options.join(' '), {
maxBuffer: 1024 * 10000 // 10 mb
}, function(error, stdout, stderr) {
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
shepherd.writeLog('stdout: ' + stdout);
@ -1177,6 +1179,35 @@ function slayer(flock) {
});
}
shepherd.setConfKMD = function() {
if (os.platform() === 'darwin') {
var komodoDir = process.env.HOME + '/Library/Application Support/Komodo',
ZcashDir = process.env.HOME + '/Library/Application Support/Zcash';
}
if (os.platform() === 'linux') {
var komodoDir = process.env.HOME + '/.komodo',
ZcashDir = process.env.HOME + '/.zcash';
}
if (os.platform() === 'win32') {
var komodoDir = process.env.APPDATA + '/Komodo',
ZcashDir = process.env.APPDATA + '/Zcash';
}
// check if kmd conf exists
_fs.access(komodoDir + '/komodo.conf', fs.constants.R_OK, function(err) {
if (err) {
console.log('creating komodo conf');
shepherd.writeLog('creating komodo conf in ' + komodoDir + '/komodo.conf');
setConf('komodod');
} else {
shepherd.writeLog('komodo conf exists');
console.log('komodo conf exists');
}
});
}
function setConf(flock) {
console.log(flock);
shepherd.writeLog('setconf ' + flock);
@ -1211,6 +1242,7 @@ function setConf(flock) {
break;
default:
var DaemonConfPath = komodoDir + '/' + flock + '/' + flock + '.conf';
if (os.platform() === 'win32') {
DaemonConfPath = path.normalize(DaemonConfPath);
}

Loading…
Cancel
Save