Built motion from commit c116dc8b.|2.6.30
[motion2.git] / server / api / system / system.controller.js
index 6672f6a..ca30319 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x53e3=['catch','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','split','length','kill','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','systeminformation','exec','../../config/logger','api','util','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','status','send','index','getAllData','then','json'];(function(_0xf299a3,_0x8fc695){var _0x140e7d=function(_0x5cc350){while(--_0x5cc350){_0xf299a3['push'](_0xf299a3['shift']());}};_0x140e7d(++_0x8fc695);}(_0x53e3,0x1bf));var _0x353e=function(_0x1bda7d,_0x803618){_0x1bda7d=_0x1bda7d-0x0;var _0x7ebf01=_0x53e3[_0x1bda7d];return _0x7ebf01;};'use strict';var info=require(_0x353e('0x0'));var exec=require('child_process')[_0x353e('0x1')];var logger=require(_0x353e('0x2'))(_0x353e('0x3'));var util=require(_0x353e('0x4'));var BPromise=require(_0x353e('0x5'));var _=require(_0x353e('0x6'));function handleError(_0x3c4f71,_0xcb010d,_0x5e8262){_0xcb010d=_0xcb010d||0x1f4;return function(_0x2d93ad){logger[_0x353e('0x7')](_0x353e('0x8'),_0x5e8262,_0xcb010d,util[_0x353e('0x9')](_0x2d93ad,{'showHidden':![],'depth':null}));delete _0x2d93ad[_0x353e('0xa')];_0x3c4f71[_0x353e('0xb')](_0xcb010d)[_0x353e('0xc')](_0x2d93ad);};}exports[_0x353e('0xd')]=function(_0x4bf969,_0x2c5b71){return info[_0x353e('0xe')]()[_0x353e('0xf')](function(_0xe7437e){return _0x2c5b71['status'](0xc8)[_0x353e('0x10')](_0xe7437e);})[_0x353e('0x11')](function(_0x4bf21e){return _0x2c5b71[_0x353e('0xb')](0x1f4)[_0x353e('0x10')](_0x4bf21e);});};exports[_0x353e('0x12')]=function(_0x5094a5,_0xa58046){var _0xc022ac=[_0x353e('0x13')];return new BPromise(function(_0x3f71fb,_0x5669a5){return exec(util[_0x353e('0x14')](_0x353e('0x15'),_0x5094a5[_0x353e('0x16')][_0x353e('0x17')]),function(_0x3732b2,_0x370763,_0x3af671){if(_0x3732b2){return _0x5669a5(_0x3732b2);}return _0x3f71fb(_0x370763);});})[_0x353e('0xf')](function(_0x27360d){var _0x3bbf84=![];var _0x7c2cbd=_0x27360d[_0x353e('0x18')](/\n/);for(var _0x56ded0=0x0,_0x3949cf=_0xc022ac[_0x353e('0x19')];_0x56ded0<_0x3949cf,_0x3bbf84===![];_0x56ded0+=0x1){if(_0x27360d['indexOf'](_0xc022ac[_0x56ded0])>=0x0){_0x3bbf84=!![];}}if(!_0x3bbf84){throw new Error(util['format']('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x5094a5[_0x353e('0x16')][_0x353e('0x17')]));}process[_0x353e('0x1a')](_0x5094a5[_0x353e('0x16')][_0x353e('0x17')],_0x353e('0x1b'));return _0xa58046[_0x353e('0xb')](0xc8)[_0x353e('0x10')]({'message':util['format'](_0x353e('0x1c'),_0x5094a5[_0x353e('0x16')]['pid'])});})[_0x353e('0x11')](handleError(_0xa58046,null,_0x353e('0x12')));};
\ No newline at end of file
+var _0x2d7a=['json','Process\x20with\x20pid\x20%s\x20killed\x20correctly','killProcess','exec','../../config/logger','api','util','bluebird','lodash','error','inspect','status','send','index','getAllData','then','catch','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','split','length','indexOf'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2d7a,0x1e3));var _0xa2d7=function(_0x3af529,_0xf4d73){_0x3af529=_0x3af529-0x0;var _0x5cf4c2=_0x2d7a[_0x3af529];return _0x5cf4c2;};'use strict';var info=require('systeminformation');var exec=require('child_process')[_0xa2d7('0x0')];var logger=require(_0xa2d7('0x1'))(_0xa2d7('0x2'));var util=require(_0xa2d7('0x3'));var BPromise=require(_0xa2d7('0x4'));var _=require(_0xa2d7('0x5'));function handleError(_0x54da15,_0x37366b,_0x1e25a6){_0x37366b=_0x37366b||0x1f4;return function(_0x40cd00){logger[_0xa2d7('0x6')]('<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s',_0x1e25a6,_0x37366b,util[_0xa2d7('0x7')](_0x40cd00,{'showHidden':![],'depth':null}));delete _0x40cd00['name'];_0x54da15[_0xa2d7('0x8')](_0x37366b)[_0xa2d7('0x9')](_0x40cd00);};}exports[_0xa2d7('0xa')]=function(_0x5be22c,_0x3f05df){return info[_0xa2d7('0xb')]()[_0xa2d7('0xc')](function(_0xa3724d){return _0x3f05df[_0xa2d7('0x8')](0xc8)['json'](_0xa3724d);})[_0xa2d7('0xd')](function(_0x2855f5){return _0x3f05df[_0xa2d7('0x8')](0x1f4)['json'](_0x2855f5);});};exports['killProcess']=function(_0x334553,_0x453548){var _0x37b909=['components/import/cm'];return new BPromise(function(_0x208b49,_0x140391){return exec(util[_0xa2d7('0xe')](_0xa2d7('0xf'),_0x334553[_0xa2d7('0x10')][_0xa2d7('0x11')]),function(_0x3b00b4,_0x3b29bd,_0x34beba){if(_0x3b00b4){return _0x140391(_0x3b00b4);}return _0x208b49(_0x3b29bd);});})[_0xa2d7('0xc')](function(_0x39c7e5){var _0x598d4b=![];var _0x3514b3=_0x39c7e5[_0xa2d7('0x12')](/\n/);for(var _0x2fe322=0x0,_0x51c31b=_0x37b909[_0xa2d7('0x13')];_0x2fe322<_0x51c31b,_0x598d4b===![];_0x2fe322+=0x1){if(_0x39c7e5[_0xa2d7('0x14')](_0x37b909[_0x2fe322])>=0x0){_0x598d4b=!![];}}if(!_0x598d4b){throw new Error(util['format']('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x334553[_0xa2d7('0x10')][_0xa2d7('0x11')]));}process['kill'](_0x334553['params'][_0xa2d7('0x11')],'SIGINT');return _0x453548[_0xa2d7('0x8')](0xc8)[_0xa2d7('0x15')]({'message':util[_0xa2d7('0xe')](_0xa2d7('0x16'),_0x334553[_0xa2d7('0x10')][_0xa2d7('0x11')])});})['catch'](handleError(_0x453548,null,_0xa2d7('0x17')));};
\ No newline at end of file