mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
change motd
This commit is contained in:
parent
f6c70529bb
commit
13a6b266cb
60
lib/API.js
60
lib/API.js
@ -21,6 +21,7 @@ var Config = require('./tools/Config');
|
||||
var Modularizer = require('./API/Modules/Modularizer.js');
|
||||
var path_structure = require('../paths.js');
|
||||
var UX = require('./API/CliUx');
|
||||
var pkg = require('../package.json');
|
||||
|
||||
var IMMUTABLE_MSG = chalk.bold.blue('Use --update-env to update environment variables');
|
||||
|
||||
@ -384,18 +385,25 @@ API.prototype.update = function(cb) {
|
||||
// Dump PM2 processes
|
||||
that.Client.executeRemote('notifyKillPM2', {}, function() {});
|
||||
|
||||
that.dump(function(err) {
|
||||
debug('Dumping successfull', err);
|
||||
that.killDaemon(function() {
|
||||
debug('------------------ Everything killed', arguments);
|
||||
that.Client.launchDaemon({interactor:false}, function(err, child) {
|
||||
that.Client.launchRPC(function() {
|
||||
that.resurrect(function() {
|
||||
Common.printOut(chalk.blue.bold('>>>>>>>>>> PM2 updated'));
|
||||
Modularizer.launchAll(that, function() {
|
||||
KMDaemon.launchAndInteract(that._conf, null, function(err, data, interactor_proc) {
|
||||
// Interactor error can be skipped here
|
||||
return cb ? cb(null, {success:true}) : that.speedList();
|
||||
that.getVersion(function(err, new_version) {
|
||||
if (!err && (pkg.version != new_version)) {
|
||||
var dt = fs.readFileSync(path.join(__dirname, that._conf.KEYMETRICS_UPDATE));
|
||||
console.log(dt.toString());
|
||||
}
|
||||
|
||||
that.dump(function(err) {
|
||||
debug('Dumping successfull', err);
|
||||
that.killDaemon(function() {
|
||||
debug('------------------ Everything killed', arguments);
|
||||
that.Client.launchDaemon({interactor:false}, function(err, child) {
|
||||
that.Client.launchRPC(function() {
|
||||
that.resurrect(function() {
|
||||
Common.printOut(chalk.blue.bold('>>>>>>>>>> PM2 updated'));
|
||||
Modularizer.launchAll(that, function() {
|
||||
KMDaemon.launchAndInteract(that._conf, null, function(err, data, interactor_proc) {
|
||||
// Interactor error can be skipped here
|
||||
return cb ? cb(null, {success:true}) : that.speedList();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -615,29 +623,19 @@ API.prototype.killDaemon = API.prototype.kill = function(cb) {
|
||||
|
||||
that.Client.executeRemote('notifyKillPM2', {}, function() {});
|
||||
|
||||
that.getVersion(function(err, data) {
|
||||
if (!err && semver.lt(data, '1.1.0')) {
|
||||
// Disable action command output if upgrading from < 1.1.0 PM2
|
||||
// This is in order to avoid duplicated output
|
||||
process.env.PM2_SILENT = 'true';
|
||||
console.log(conf.PREFIX_MSG + 'Killing processes...');
|
||||
}
|
||||
that.killAllModules(function() {
|
||||
that._operate('deleteProcessId', 'all', function(err, list) {
|
||||
Common.printOut(conf.PREFIX_MSG + 'All processes have been stopped and deleted');
|
||||
process.env.PM2_SILENT = 'false';
|
||||
|
||||
that.killAllModules(function() {
|
||||
that._operate('deleteProcessId', 'all', function(err, list) {
|
||||
Common.printOut(conf.PREFIX_MSG + 'All processes have been stopped and deleted');
|
||||
process.env.PM2_SILENT = 'false';
|
||||
|
||||
that.killInteract(function(err, data) {
|
||||
that.Client.killDaemon(function(err, res) {
|
||||
if (err) Common.printError(err);
|
||||
Common.printOut(conf.PREFIX_MSG + 'PM2 stopped');
|
||||
return cb ? cb(err, res) : that.exitCli(conf.SUCCESS_EXIT);
|
||||
});
|
||||
that.killInteract(function(err, data) {
|
||||
that.Client.killDaemon(function(err, res) {
|
||||
if (err) Common.printError(err);
|
||||
Common.printOut(conf.PREFIX_MSG + 'PM2 stopped');
|
||||
return cb ? cb(err, res) : that.exitCli(conf.SUCCESS_EXIT);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -5,4 +5,4 @@
|
||||
/_/ |_\___/\__, /_/ /_/ /_/\___/\__/_/ /_/\___/____/
|
||||
/____/
|
||||
|
||||
A Node.js monitoring solution you will love
|
||||
Harden your Node.js application, today
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
|
||||
-------------
|
||||
|
||||
Looking for a complete monitoring and management tool for PM2?
|
||||
_ _ _ _
|
||||
| | _____ _ _ _ __ ___ ___| |_ _ __(_) ___ ___ (_) ___
|
||||
| |/ / _ \ | | | '_ ` _ \ / _ \ __| '__| |/ __/ __| | |/ _ \
|
||||
| < __/ |_| | | | | | | __/ |_| | | | (__\__ \_| | (_) |
|
||||
|_|\_\___|\__, |_| |_| |_|\___|\__|_| |_|\___|___(_)_|\___/
|
||||
|___/
|
||||
|
||||
Features
|
||||
|
||||
- Real Time Dashboard
|
||||
- CPU/Memory monitoring
|
||||
- HTTP monitoring
|
||||
- Event notification
|
||||
- Custom value monitoring
|
||||
- Real Time log display
|
||||
|
||||
Checkout
|
||||
|
||||
https://keymetrics.io/
|
||||
|
||||
-------------
|
||||
@ -12,7 +12,9 @@ __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
|
||||
_\///______________\///______________\///__\///////////////__
|
||||
|
||||
|
||||
Production Process Manager for Node.js apps
|
||||
Community Edition
|
||||
|
||||
Production Process Manager for Node.js applications
|
||||
with a built-in Load Balancer.
|
||||
|
||||
|
||||
@ -29,7 +31,7 @@ __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
|
||||
$ pm2 startup
|
||||
|
||||
To go further checkout:
|
||||
http://pm2.io
|
||||
http://pm2.io/
|
||||
|
||||
|
||||
-------------
|
||||
18
lib/motd.update
Normal file
18
lib/motd.update
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
-------------
|
||||
__ __ __ _
|
||||
/ //_/__ __ ______ ___ ___ / /______(_)_________
|
||||
/ ,< / _ \/ / / / __ `__ \/ _ \/ __/ ___/ / ___/ ___/
|
||||
/ /| / __/ /_/ / / / / / / __/ /_/ / / / /__(__ )
|
||||
/_/ |_\___/\__, /_/ /_/ /_/\___/\__/_/ /_/\___/____/
|
||||
/____/
|
||||
|
||||
Start monitoring your Node.js application today
|
||||
|
||||
$ pm2 monitor
|
||||
|
||||
To know more about the PM2 monitoring solution:
|
||||
|
||||
https://keymetrics.io/
|
||||
|
||||
-------------
|
||||
Loading…
x
Reference in New Issue
Block a user