diff --git a/bin/pm2 b/bin/pm2 index 5c78896ba..4f4c04d6b 100755 --- a/bin/pm2 +++ b/bin/pm2 @@ -605,12 +605,16 @@ commander.command('plus [secret] [public] [name]') infoNode: _opts.infoNode, discrete: _opts.discrete, installAll: _opts.installAll, + gen_uid: _opts.gen, public: pub, secret: sec, name: name, ws: true } + if (!name) + opts.name = require('os').hostname() + '-' + require('crypto').randomBytes(2).toString('hex') + if (sec == 'link' || sec == 'relink') { return pm2._pre_interact(null, null, null, opts, function(err, dt) { pm2.speedList() diff --git a/lib/API/Interaction.js b/lib/API/Interaction.js index 47feb3938..15eb6d80d 100644 --- a/lib/API/Interaction.js +++ b/lib/API/Interaction.js @@ -159,8 +159,7 @@ module.exports = function(CLI) { } KMDaemon.launchAndInteract(that._conf, infos, function(err, dt) { if (err) { - Common.printError(chalk.red('[PM2 agent] ') + err) - Common.printError(chalk.cyan('[PM2 agent] ') + 'Run `$ pm2 plus` to connect') + Common.printError(chalk.cyan('[PM2.IO] ') + 'Run `$ pm2 plus` to connect') return that.exitCli(cst.ERROR_EXIT); } if (!cb) {