Built motion from commit (unavailable).|2.5.1
[motion2.git] / server / api / system / system.controller.js
index e0d9bfe..bcfe303 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4072=['split','length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','SIGINT','json','catch','killProcess','systeminformation','child_process','exec','util','bluebird','lodash','error','inspect','name','index','then','status','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid'];(function(_0x37687f,_0x577dcc){var _0x3853e0=function(_0x26ecfb){while(--_0x26ecfb){_0x37687f['push'](_0x37687f['shift']());}};_0x3853e0(++_0x577dcc);}(_0x4072,0x198));var _0x2407=function(_0x2467b8,_0x584199){_0x2467b8=_0x2467b8-0x0;var _0x5d3095=_0x4072[_0x2467b8];return _0x5d3095;};'use strict';var info=require(_0x2407('0x0'));var exec=require(_0x2407('0x1'))[_0x2407('0x2')];var logger=require('../../config/logger')('api');var util=require(_0x2407('0x3'));var BPromise=require(_0x2407('0x4'));var _=require(_0x2407('0x5'));function handleError(_0x42a9a6,_0x35986b,_0x3513da){_0x35986b=_0x35986b||0x1f4;return function(_0x1d27df){logger[_0x2407('0x6')]('<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s',_0x3513da,_0x35986b,util[_0x2407('0x7')](_0x1d27df,{'showHidden':![],'depth':null}));delete _0x1d27df[_0x2407('0x8')];_0x42a9a6['status'](_0x35986b)['send'](_0x1d27df);};}exports[_0x2407('0x9')]=function(_0x35c9ee,_0x4c19c7){return info['getAllData']()[_0x2407('0xa')](function(_0x268d1e){return _0x4c19c7[_0x2407('0xb')](0xc8)['json'](_0x268d1e);})['catch'](function(_0x2d66d4){return _0x4c19c7[_0x2407('0xb')](0x1f4)['json'](_0x2d66d4);});};exports['killProcess']=function(_0x43d790,_0x430442){var _0x4bc7dc=[_0x2407('0xc')];return new BPromise(function(_0x4f627c,_0x102d41){return exec(util[_0x2407('0xd')](_0x2407('0xe'),_0x43d790[_0x2407('0xf')][_0x2407('0x10')]),function(_0x13edaa,_0x224d37,_0x3bd33f){if(_0x13edaa){return _0x102d41(_0x13edaa);}return _0x4f627c(_0x224d37);});})['then'](function(_0x52b564){var _0xdc2272=![];var _0x542387=_0x52b564[_0x2407('0x11')](/\n/);for(var _0x33c9a6=0x0,_0x5ee401=_0x4bc7dc[_0x2407('0x12')];_0x33c9a6<_0x5ee401,_0xdc2272===![];_0x33c9a6+=0x1){if(_0x52b564[_0x2407('0x13')](_0x4bc7dc[_0x33c9a6])>=0x0){_0xdc2272=!![];}}if(!_0xdc2272){throw new Error(util[_0x2407('0xd')](_0x2407('0x14'),_0x43d790[_0x2407('0xf')][_0x2407('0x10')]));}process['kill'](_0x43d790[_0x2407('0xf')][_0x2407('0x10')],_0x2407('0x15'));return _0x430442[_0x2407('0xb')](0xc8)[_0x2407('0x16')]({'message':util[_0x2407('0xd')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x43d790[_0x2407('0xf')][_0x2407('0x10')])});})[_0x2407('0x17')](handleError(_0x430442,null,_0x2407('0x18')));};
\ No newline at end of file
+var _0xe6d9=['exec','../../config/logger','api','util','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','send','index','getAllData','status','json','catch','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','then','split','length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','params','pid','kill','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','systeminformation','child_process'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xe6d9,0x1cf));var _0x9e6d=function(_0x223af8,_0x58016f){_0x223af8=_0x223af8-0x0;var _0x4699f=_0xe6d9[_0x223af8];return _0x4699f;};'use strict';var info=require(_0x9e6d('0x0'));var exec=require(_0x9e6d('0x1'))[_0x9e6d('0x2')];var logger=require(_0x9e6d('0x3'))(_0x9e6d('0x4'));var util=require(_0x9e6d('0x5'));var BPromise=require(_0x9e6d('0x6'));var _=require(_0x9e6d('0x7'));function handleError(_0x2fbe6e,_0x558e1a,_0x4d7a18){_0x558e1a=_0x558e1a||0x1f4;return function(_0x4b384e){logger[_0x9e6d('0x8')](_0x9e6d('0x9'),_0x4d7a18,_0x558e1a,util[_0x9e6d('0xa')](_0x4b384e,{'showHidden':![],'depth':null}));delete _0x4b384e[_0x9e6d('0xb')];_0x2fbe6e['status'](_0x558e1a)[_0x9e6d('0xc')](_0x4b384e);};}exports[_0x9e6d('0xd')]=function(_0x58d946,_0x5b036f){return info[_0x9e6d('0xe')]()['then'](function(_0x29bb8b){return _0x5b036f[_0x9e6d('0xf')](0xc8)[_0x9e6d('0x10')](_0x29bb8b);})[_0x9e6d('0x11')](function(_0x3cfcd7){return _0x5b036f[_0x9e6d('0xf')](0x1f4)['json'](_0x3cfcd7);});};exports['killProcess']=function(_0x1bc088,_0x2b0d88){var _0x5366cd=[_0x9e6d('0x12')];return new BPromise(function(_0x18ab41,_0x595e59){return exec(util[_0x9e6d('0x13')](_0x9e6d('0x14'),_0x1bc088['params']['pid']),function(_0x32813c,_0x35f243,_0x1b793f){if(_0x32813c){return _0x595e59(_0x32813c);}return _0x18ab41(_0x35f243);});})[_0x9e6d('0x15')](function(_0x48ad9e){var _0x4cef8a=![];var _0x12e307=_0x48ad9e[_0x9e6d('0x16')](/\n/);for(var _0x1d7fd9=0x0,_0x10abd7=_0x5366cd[_0x9e6d('0x17')];_0x1d7fd9<_0x10abd7,_0x4cef8a===![];_0x1d7fd9+=0x1){if(_0x48ad9e[_0x9e6d('0x18')](_0x5366cd[_0x1d7fd9])>=0x0){_0x4cef8a=!![];}}if(!_0x4cef8a){throw new Error(util['format'](_0x9e6d('0x19'),_0x1bc088[_0x9e6d('0x1a')][_0x9e6d('0x1b')]));}process[_0x9e6d('0x1c')](_0x1bc088['params']['pid'],_0x9e6d('0x1d'));return _0x2b0d88['status'](0xc8)[_0x9e6d('0x10')]({'message':util[_0x9e6d('0x13')](_0x9e6d('0x1e'),_0x1bc088[_0x9e6d('0x1a')][_0x9e6d('0x1b')])});})[_0x9e6d('0x11')](handleError(_0x2b0d88,null,'killProcess'));};
\ No newline at end of file