UNPKG

roar-agent

Version:

The Node.js Roar Agent that listens for and executes scan jobs

13 lines (10 loc) 292 B
var exec = require('child_process').exec; exec('pm2 describe roar-agent', function(err, stdout, stderr) { var l; if (stdout) { l = stdout.split('\n').filter(l => l.indexOf('status') !== -1 && l.indexOf('online') !== -1); } if (!l || l.length !== 1) { exec('{cmd}'); } });