61c22e741112b9c4580095e53fc3b73b2ed5dc81
[motion-next.git] / server / config / pm2 / index.js
1 const a849_0xc6d5=['list','dump','restart','nodeArgs','environment','interpreter_args','isTest','node_args','delete','connected','stop','debug','--inspect','saved','../config.service','getConfigService','then','disconnect','pm2','start','describe','interpreter','vscode_debugger','interpreterArgs'];(function(_0x17c87d,_0xc6d5d5){const _0x2e1898=function(_0x199bea){while(--_0x199bea){_0x17c87d['push'](_0x17c87d['shift']());}};_0x2e1898(++_0xc6d5d5);}(a849_0xc6d5,0x1a6));const a849_0x2e18=function(_0x17c87d,_0xc6d5d5){_0x17c87d=_0x17c87d-0x0;let _0x2e1898=a849_0xc6d5[_0x17c87d];return _0x2e1898;};const _0xfe2ae=a849_0x2e18;'use strict';const pm2=require(_0xfe2ae('0x4')),cs=require(_0xfe2ae('0x0'))[_0xfe2ae('0x1')]();function connect(){return new Promise(function(_0x199bea,_0x1d1c4a){return pm2['connect'](function(_0x2150ce){const _0x226b94=a849_0x2e18;_0x2150ce?_0x1d1c4a(_0x2150ce):_0x199bea(_0x226b94('0x13'));});});}exports[_0xfe2ae('0x5')]=function(_0x3d9734){const _0x5ebe04=_0xfe2ae;return!(cs['isProduction']||cs[_0x5ebe04('0x10')]||cs[_0x5ebe04('0xe')]===_0x5ebe04('0x8'))&&(_0x3d9734[_0x5ebe04('0x7')]='node',_0x3d9734[_0x5ebe04('0xf')]=['--inspect'],_0x3d9734[_0x5ebe04('0x11')]=[_0x5ebe04('0x16')],_0x3d9734[_0x5ebe04('0x9')]=[_0x5ebe04('0x16')],_0x3d9734[_0x5ebe04('0xd')]=[_0x5ebe04('0x16')]),connect()[_0x5ebe04('0x2')](function(){return new Promise(function(_0x95a3d4,_0x264f4e){const _0x5c4ee3=a849_0x2e18;return pm2[_0x5c4ee3('0x5')](_0x3d9734,function(_0x7b10b3,_0x5de727){const _0x8c507f=_0x5c4ee3;_0x7b10b3?_0x264f4e(_0x7b10b3):(pm2[_0x8c507f('0x3')](),_0x95a3d4(_0x5de727));});});});},exports[_0xfe2ae('0x14')]=function(_0x111c18){const _0x472577=_0xfe2ae;return connect()[_0x472577('0x2')](function(){return new Promise(function(_0x120d69,_0x5cb269){const _0x2bfc89=a849_0x2e18;return pm2[_0x2bfc89('0x14')](_0x111c18,function(_0xa2a18f,_0x44c3f3){const _0x72533d=_0x2bfc89;_0xa2a18f?_0x5cb269(_0xa2a18f):(console[_0x72533d('0x15')]('Stopped',_0x111c18),_0x120d69(_0x44c3f3));});});});},exports[_0xfe2ae('0xc')]=function(_0x5c3e80){return connect()['then'](function(){return new Promise(function(_0x293e0e,_0x2c08ea){const _0x16cb31=a849_0x2e18;return pm2[_0x16cb31('0xc')](_0x5c3e80,function(_0x68957d,_0x104044){_0x68957d?_0x2c08ea(_0x68957d):(console['debug']('Restarted',_0x5c3e80),_0x293e0e(_0x104044));});});});},exports[_0xfe2ae('0xa')]=function(){return connect()['then'](function(){return new Promise(function(_0x5183de,_0x2fd255){const _0x293bea=a849_0x2e18;return pm2[_0x293bea('0xa')](function(_0x46a8cf,_0x4406ed){_0x46a8cf?_0x2fd255(_0x46a8cf):_0x5183de(_0x4406ed);});});});},exports[_0xfe2ae('0x6')]=function(_0x2f92fa){return connect()['then'](function(){return new Promise(function(_0x1d6286,_0xfc6bf5){return pm2['describe'](_0x2f92fa,function(_0x538e4d,_0x5dad38){_0x538e4d?_0xfc6bf5(_0x538e4d):_0x1d6286(_0x5dad38);});});});},exports[_0xfe2ae('0x12')]=function(_0x41b743){const _0x5c5c25=_0xfe2ae;return connect()[_0x5c5c25('0x2')](function(){return new Promise(function(_0x57521b,_0x24275d){const _0x62fe19=a849_0x2e18;return pm2[_0x62fe19('0x12')](_0x41b743,function(_0x4e23c2,_0x5b0bcb){const _0x5de6c6=_0x62fe19;_0x4e23c2?_0x24275d(_0x4e23c2):(console[_0x5de6c6('0x15')]('Stopped\x20and\x20Deleted',_0x41b743),_0x57521b(_0x5b0bcb));});});});},exports[_0xfe2ae('0xb')]=function(){const _0x1717a0=_0xfe2ae;return connect()[_0x1717a0('0x2')](function(){return new Promise(function(_0x5bd602,_0x6cad24){const _0x44da46=a849_0x2e18;return pm2[_0x44da46('0xb')](function(_0x66026){const _0x50b0e6=_0x44da46;_0x66026?_0x6cad24(_0x66026):_0x5bd602(_0x50b0e6('0x17'));});});});};