8ec60a4b38f7a26da1f5185cfcf36cd40adf2a2c
[motion-next.git] / server / config / pm2 / index.js
1 const a849_0x15ac=['environment','list','Stopped\x20and\x20Deleted','stop','Stopped','dump','../config.service','describe','pm2','Restarted','--inspect','start','delete','node','connected','interpreter','getConfigService','debug','vscode_debugger','node_args','interpreterArgs','interpreter_args','nodeArgs','connect','restart','then'];(function(_0x396fc6,_0x15ac09){const _0x206426=function(_0x1ea335){while(--_0x1ea335){_0x396fc6['push'](_0x396fc6['shift']());}};_0x206426(++_0x15ac09);}(a849_0x15ac,0xb0));const a849_0x2064=function(_0x396fc6,_0x15ac09){_0x396fc6=_0x396fc6-0x0;let _0x206426=a849_0x15ac[_0x396fc6];return _0x206426;};const _0xe8ded7=a849_0x2064;'use strict';const pm2=require(_0xe8ded7('0xe')),cs=require(_0xe8ded7('0xc'))[_0xe8ded7('0x16')]();function connect(){return new Promise(function(_0x1ea335,_0x1f3dce){const _0x3a5436=a849_0x2064;return pm2[_0x3a5436('0x3')](function(_0x5fbe46){const _0x19c8d0=_0x3a5436;_0x5fbe46?_0x1f3dce(_0x5fbe46):_0x1ea335(_0x19c8d0('0x14'));});});}exports[_0xe8ded7('0x11')]=function(_0xccb9cd){const _0x2e5015=_0xe8ded7;return!(cs['isProduction']||cs['isTest']||cs[_0x2e5015('0x6')]===_0x2e5015('0x18'))&&(_0xccb9cd[_0x2e5015('0x15')]=_0x2e5015('0x13'),_0xccb9cd[_0x2e5015('0x1')]=[_0x2e5015('0x10')],_0xccb9cd[_0x2e5015('0x19')]=['--inspect'],_0xccb9cd[_0x2e5015('0x0')]=[_0x2e5015('0x10')],_0xccb9cd[_0x2e5015('0x2')]=[_0x2e5015('0x10')]),connect()[_0x2e5015('0x5')](function(){return new Promise(function(_0x12abca,_0x1fb532){return pm2['start'](_0xccb9cd,function(_0x480bf3,_0x5e976e){_0x480bf3?_0x1fb532(_0x480bf3):(pm2['disconnect'](),_0x12abca(_0x5e976e));});});});},exports[_0xe8ded7('0x9')]=function(_0x24d4e9){return connect()['then'](function(){return new Promise(function(_0x57063b,_0x7bea02){return pm2['stop'](_0x24d4e9,function(_0x588da5,_0x5ac1d4){const _0x1b7358=a849_0x2064;_0x588da5?_0x7bea02(_0x588da5):(console[_0x1b7358('0x17')](_0x1b7358('0xa'),_0x24d4e9),_0x57063b(_0x5ac1d4));});});});},exports['restart']=function(_0x36c2ea){const _0xace050=_0xe8ded7;return connect()[_0xace050('0x5')](function(){return new Promise(function(_0x13b427,_0x2b2334){const _0x1c708f=a849_0x2064;return pm2[_0x1c708f('0x4')](_0x36c2ea,function(_0x3a3e5e,_0x1d731f){const _0x410131=_0x1c708f;_0x3a3e5e?_0x2b2334(_0x3a3e5e):(console[_0x410131('0x17')](_0x410131('0xf'),_0x36c2ea),_0x13b427(_0x1d731f));});});});},exports[_0xe8ded7('0x7')]=function(){const _0x53ff90=_0xe8ded7;return connect()[_0x53ff90('0x5')](function(){return new Promise(function(_0x12c207,_0xb4d504){return pm2['list'](function(_0x2c717a,_0x23a580){_0x2c717a?_0xb4d504(_0x2c717a):_0x12c207(_0x23a580);});});});},exports[_0xe8ded7('0xd')]=function(_0x36fcc7){const _0x5c1eb7=_0xe8ded7;return connect()[_0x5c1eb7('0x5')](function(){return new Promise(function(_0x5effe6,_0x169a14){return pm2['describe'](_0x36fcc7,function(_0x49e01c,_0x246cdd){_0x49e01c?_0x169a14(_0x49e01c):_0x5effe6(_0x246cdd);});});});},exports['delete']=function(_0x362a72){const _0x37cd8a=_0xe8ded7;return connect()[_0x37cd8a('0x5')](function(){return new Promise(function(_0x445386,_0x49d9b9){const _0x2ef101=a849_0x2064;return pm2[_0x2ef101('0x12')](_0x362a72,function(_0xca4916,_0xfd54ad){const _0x36e8c1=_0x2ef101;_0xca4916?_0x49d9b9(_0xca4916):(console[_0x36e8c1('0x17')](_0x36e8c1('0x8'),_0x362a72),_0x445386(_0xfd54ad));});});});},exports[_0xe8ded7('0xb')]=function(){return connect()['then'](function(){return new Promise(function(_0x2ceeba,_0x397e9a){return pm2['dump'](function(_0x1fba45){_0x1fba45?_0x397e9a(_0x1fba45):_0x2ceeba('saved');});});});};