|
@ -94,6 +94,10 @@ shepherd.appConfig = { |
|
|
"v2": true, |
|
|
"v2": true, |
|
|
"useBasiliskInstance": true, |
|
|
"useBasiliskInstance": true, |
|
|
"debug": true, |
|
|
"debug": true, |
|
|
|
|
|
"cli": { |
|
|
|
|
|
"passthru": false, |
|
|
|
|
|
"default": false |
|
|
|
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
shepherd.writeLog = function(data) { |
|
|
shepherd.writeLog = function(data) { |
|
@ -1219,10 +1223,24 @@ function herder(flock, data) { |
|
|
if (status === 'closed') { |
|
|
if (status === 'closed') { |
|
|
// start komodod via exec
|
|
|
// start komodod via exec
|
|
|
if (data.ac_name === 'komodod') { |
|
|
if (data.ac_name === 'komodod') { |
|
|
console.log('exec' + komododBin + ' ' + data.ac_options.join(' ')); |
|
|
const _customParamDict = { |
|
|
shepherd.writeLog('exec' + komododBin + ' ' + data.ac_options.join(' ')); |
|
|
'silent': '&', |
|
|
|
|
|
'reindex': '-reindex', |
|
|
|
|
|
'change': '-pubkey=' |
|
|
|
|
|
}; |
|
|
|
|
|
const _customParam; |
|
|
|
|
|
|
|
|
|
|
|
if (data.ac_custom_param === 'silent' || |
|
|
|
|
|
data.ac_custom_param === 'reindex') { |
|
|
|
|
|
_customParam = ' ' + _customParamDict[data.ac_custom_param]; |
|
|
|
|
|
} else if (data.ac_custom_param === 'change' && data.ac_custom_param_value) { |
|
|
|
|
|
_customParam = ' ' + _customParamDict[data.ac_custom_param] + data.ac_custom_param_value; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log('exec' + komododBin + ' ' + data.ac_options.join(' ') + _customParam); |
|
|
|
|
|
shepherd.writeLog('exec' + komododBin + ' ' + data.ac_options.join(' ') + _customParam); |
|
|
|
|
|
|
|
|
exec(komododBin + ' ' + data.ac_options.join(' '), { |
|
|
exec(komododBin + ' ' + data.ac_options.join(' ') + _customParam, { |
|
|
maxBuffer: 1024 * 10000 // 10 mb
|
|
|
maxBuffer: 1024 * 10000 // 10 mb
|
|
|
}, function(error, stdout, stderr) { |
|
|
}, function(error, stdout, stderr) { |
|
|
// console.log('stdout: ' + stdout);
|
|
|
// console.log('stdout: ' + stdout);
|
|
|