Skip to content

Commit

Permalink
Add automatic process termination if no running mode (discover/monito…
Browse files Browse the repository at this point in the history
…r) was specified
  • Loading branch information
rkaw92 committed Jul 18, 2017
1 parent ed406e9 commit b0a133f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,10 @@ monitor.start().done(function() {
process.exit(0);
return;
}

if (!argv.discover && !argv.monitor) {
logger.warn({ event: 'pm2-zabbix#noWork', argv: process.argv }, 'Neither --discover nor --monitor was specified - exiting because we have nothing to do');
process.exit(0);
return;
}
});

0 comments on commit b0a133f

Please sign in to comment.