Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
server.reload = function (name, cb) {
pm2.sendSignalToProcessName('SIGTERM', name, function (err) {
if(err) {
log.applog('error', 'pm2 List faild: ' + err);
}
return cb(err);
});
}
bus.on('process:event', function (data) {
if (data.event === 'exit') {
const name = data.process.name
if (name === iceteaName) {
debug('Icetea node exited, sending SIGTERM to tendermint node')
pm2.sendSignalToProcessName('SIGTERM', tendermintName)
}
}
})
})