mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
send RECYCLE option to backoffice - override MACHINE NAME with result returned
This commit is contained in:
parent
aa1cb6a126
commit
bd627dbfdf
@ -201,10 +201,14 @@ var Daemon = {
|
||||
}
|
||||
}, function(err, km_data) {
|
||||
self.current_km_data = km_data;
|
||||
if (err) return cb(err);
|
||||
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
if (self.opts.RECYCLE) {
|
||||
if (!km_data.name) {
|
||||
console.error('Error no previous machine name for recycle option returned!');
|
||||
}
|
||||
self.opts.MACHINE_NAME = km_data.name;
|
||||
};
|
||||
|
||||
// For Human feedback
|
||||
if (process.send)
|
||||
|
||||
@ -336,9 +336,8 @@ InteractorDaemonizer.getSetKeys = function(secret_key, public_key, machine_name,
|
||||
try {
|
||||
var interaction_conf = json5.parse(fs.readFileSync(cst.INTERACTION_CONF));
|
||||
|
||||
if (!secret_key) {
|
||||
if (!secret_key)
|
||||
recycle = recycle ? recycle : interaction_conf.recycle;
|
||||
}
|
||||
|
||||
public_key = public_key ? public_key : interaction_conf.public_key;
|
||||
machine_name = machine_name ? machine_name : interaction_conf.machine_name;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user