mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
1. add post_update schema; 2. fix log path bug.
This commit is contained in:
parent
d7aadc9bf4
commit
8d6e7aebe3
@ -100,14 +100,13 @@ Common.prepareAppConf = function(app, cwd, outputter) {
|
||||
|
||||
['log', 'out', 'error', 'pid'].forEach(function(f){
|
||||
var af = app[f + '_file'], ps, ext = (f == 'pid' ? 'pid':'log'), isStd = !~['log', 'pid'].indexOf(f);
|
||||
|
||||
if((f == 'log' && typeof af == 'boolean' && af) || !af){
|
||||
if((f == 'log' && typeof af == 'boolean' && af) || (f != 'log' && !af)){
|
||||
ps = [cst['DEFAULT_' + ext.toUpperCase() + '_PATH'], formated_app_name + (isStd ? '-' + f : '') + '.' + ext];
|
||||
}else{
|
||||
}else if(f != 'log' || (f == 'log' && af)){
|
||||
ps = [cwd, af];
|
||||
}
|
||||
//pm_log_path
|
||||
app['pm_' + (isStd ? f.substr(0, 3) + '_' : '') + ext + '_path'] = p.resolve.apply(null, ps);
|
||||
// PM2 paths
|
||||
ps && (app['pm_' + (isStd ? f.substr(0, 3) + '_' : '') + ext + '_path'] = p.resolve.apply(null, ps));
|
||||
delete app[f + '_file']
|
||||
});
|
||||
|
||||
|
||||
@ -110,5 +110,8 @@
|
||||
},
|
||||
"force": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"post_update": {
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user