new flag: --no-pmx

This commit is contained in:
jshkurti 2015-08-05 19:15:25 +02:00
parent 5fc7d61545
commit 5faefd2ac8
5 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,6 @@
# Next
- New flag `--no-pmx` : starts an app without injecting pmx
# 0.14.6

View File

@ -50,6 +50,7 @@ commander.version(pkg.version)
.option('--no-vizion', 'start an app without vizion feature (versioning control)')
.option('--no-autorestart', 'start an app without automatic restart')
.option('--no-treekill', 'Only kill the main process, not detached children')
.option('--no-pmx', 'start an app without pmx')
.usage('[cmd] app');

View File

@ -23,7 +23,9 @@ delete process.env.pm2_env;
*/
(function ProcessContainer() {
var fs = require('fs');
var pmx = require('pmx').init();
if (process.env.pmx === "true")
require('pmx').init();
var stdFile = pm2_env.pm_log_path;
var outFile = pm2_env.pm_out_log_path;

View File

@ -1,7 +1,9 @@
// Inject custom modules
require('pmx').init({
http: false
});
if (process.env.pmx === "true") {
require('pmx').init({
http: false
});
}
// Rename the process
process.title = 'node ' + process.env.pm_exec_path;

View File

@ -71,6 +71,9 @@
"vizion" : {
"type": "boolean"
},
"pmx" : {
"type": "boolean"
},
"autorestart" : {
"type": "boolean"
},