automatic upgrade procedure from TCP to SOCKET

This commit is contained in:
tknew2 2014-09-19 00:22:45 +02:00
parent 84f1ca116d
commit f09eef0a01
3 changed files with 33 additions and 33 deletions

View File

@ -71,8 +71,8 @@
"main": "index.js",
"scripts": {
"test": "NODE_ENV=test bash test/index.sh && NODE_ENV=test bash test/main.sh",
"preinstall" : "bash ./scripts/preinstall.sh",
"postinstall" : "bash ./scripts/postinstall.sh"
"preinstall": "bash ./scripts/preinstall.sh",
"postinstall": "bash ./scripts/postinstall.sh"
},
"keywords": [
"cli",
@ -118,31 +118,31 @@
"pm2": "./bin/pm2"
},
"dependencies": {
"async": "~0.9.0",
"axm": "~0.1.7",
"chalk": "~0.5.1",
"chokidar": "0.8.4",
"cli-table": "~0.3.0",
"coffee-script": "~1.8.0",
"colors": "~0.6.2",
"commander": "~2.3.0",
"cron": "~1.0.4",
"debug": "~2.0.0",
"eventemitter2": "~0.4.14",
"json-stringify-safe": "~5.0.0",
"nssocket": "~0.5.1",
"punt" : "~2.2.0",
"pidusage": "~0.1.0",
"async" : "~0.9.0",
"axm" : "~0.1.7",
"chalk" : "~0.5.1",
"chokidar" : "0.8.4",
"cli-table" : "0.3.0",
"coffee-script" : "1.8.0",
"colors" : "0.6.2",
"commander" : "2.3.0",
"cron" : "1.0.4",
"debug" : "2.0.0",
"eventemitter2" : "0.4.14",
"json-stringify-safe" : "5.0.0",
"moment" : "~2.8.2",
"nssocket" : "0.5.1",
"pidusage" : "0.1.0",
"pm2-axon": "2.0.2",
"pm2-axon-rpc": "0.3.3",
"pm2-interface" : "2.0.1",
"pm2-axon" : "2.0.2",
"pm2-axon-rpc" : "0.3.3",
"pm2-deploy" : "~0.1.0",
"pm2-interface" : "2.0.1",
"pm2-multimeter" : "0.1.2",
"pm2-rpc-fallback" : "3.0.3",
"pm2-deploy": "~0.1.0",
"pm2-multimeter": "~0.1.2",
"pm2-rpc-fallback" : "~2.8.0",
"moment" : "~2.8.2",
"uid-number": "~0.0.5"
"punt" : "2.2.0",
"uid-number" : "0.0.5"
},
"devDependencies": {
"mocha": "^1.20.1",
@ -151,8 +151,8 @@
"promise-spawner": "^0.0.3"
},
"optionalDependencies": {
"pm2-logs" : "~0.1.1",
"ikt" : "git+http://ikt.pm2.io/ikt.git#master"
"pm2-logs": "~0.1.1",
"ikt": "git+http://ikt.pm2.io/ikt.git#master"
},
"bugs": {
"url": "https://github.com/Unitech/pm2/issues"

View File

@ -25,7 +25,7 @@ function killEverything() {
if (interactor_pid) {
try {
console.log('Killing interactor');
console.log('[PM2] Killing interactor');
process.kill(interactor_pid);
}
catch (err) {
@ -34,7 +34,7 @@ function killEverything() {
if (pm2_pid) {
try {
console.log('Killing PM2');
console.log('[PM2] Killing PM2');
process.kill(pm2_pid);
}
catch (err) {
@ -51,18 +51,18 @@ var fallback = require('pm2-rpc-fallback').fallback;
fallback(cst, function(err, data) {
if (err && err.online) {
// Right RPC communcation
// Right RPC communcation
return process.exit(1);
}
else if (err && err.offline) {
console.log('PM2 already offline');
console.log('[PM2] Online');
return process.exit(0);
}
else if (err) {
return killEverything();
}
if (data) {
console.log('Killing old PM2');
console.log('[PM2] Killing old PM2');
return killEverything();
}
return false;

View File

@ -11,7 +11,7 @@ try {
if (pm2_pid) {
try {
process.kill(parseInt(pm2_pid), 0);
console.log('PM2 online');
console.log('[PM2] PM2 online. Processing.');
process.exit(0);
}
catch (err) {