Built motion from commit f9526609.|2.6.29
[motion2.git] / server / api / system / system.controller.js
index 5bf06bc..4b40718 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7977=['status','send','index','getAllData','then','json','catch','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','length','indexOf','pid','kill','params','SIGINT','child_process','../../config/logger','api','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name'];(function(_0x67d4f5,_0xed252c){var _0x3c98b6=function(_0x1b00c5){while(--_0x1b00c5){_0x67d4f5['push'](_0x67d4f5['shift']());}};_0x3c98b6(++_0xed252c);}(_0x7977,0x12f));var _0x7797=function(_0x2bea35,_0x3f7baf){_0x2bea35=_0x2bea35-0x0;var _0x8477cb=_0x7977[_0x2bea35];return _0x8477cb;};'use strict';var info=require('systeminformation');var exec=require(_0x7797('0x0'))['exec'];var logger=require(_0x7797('0x1'))(_0x7797('0x2'));var util=require('util');var BPromise=require(_0x7797('0x3'));var _=require(_0x7797('0x4'));function handleError(_0x40f5c7,_0x1ea230,_0x3355a9){_0x1ea230=_0x1ea230||0x1f4;return function(_0x39d791){logger[_0x7797('0x5')](_0x7797('0x6'),_0x3355a9,_0x1ea230,util[_0x7797('0x7')](_0x39d791,{'showHidden':![],'depth':null}));delete _0x39d791[_0x7797('0x8')];_0x40f5c7[_0x7797('0x9')](_0x1ea230)[_0x7797('0xa')](_0x39d791);};}exports[_0x7797('0xb')]=function(_0x43e13a,_0x4ccc78){return info[_0x7797('0xc')]()[_0x7797('0xd')](function(_0x342ee5){return _0x4ccc78['status'](0xc8)[_0x7797('0xe')](_0x342ee5);})[_0x7797('0xf')](function(_0x44590b){return _0x4ccc78[_0x7797('0x9')](0x1f4)[_0x7797('0xe')](_0x44590b);});};exports[_0x7797('0x10')]=function(_0x1512d0,_0x41b2f5){var _0x41fd4d=[_0x7797('0x11')];return new BPromise(function(_0x1aff0a,_0x4764b7){return exec(util[_0x7797('0x12')](_0x7797('0x13'),_0x1512d0['params']['pid']),function(_0x9c2977,_0x277d44,_0x14f6af){if(_0x9c2977){return _0x4764b7(_0x9c2977);}return _0x1aff0a(_0x277d44);});})['then'](function(_0x4520c7){var _0x49c5e0=![];var _0x302a1c=_0x4520c7['split'](/\n/);for(var _0x5351f5=0x0,_0x5c3052=_0x41fd4d[_0x7797('0x14')];_0x5351f5<_0x5c3052,_0x49c5e0===![];_0x5351f5+=0x1){if(_0x4520c7[_0x7797('0x15')](_0x41fd4d[_0x5351f5])>=0x0){_0x49c5e0=!![];}}if(!_0x49c5e0){throw new Error(util['format']('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x1512d0['params'][_0x7797('0x16')]));}process[_0x7797('0x17')](_0x1512d0[_0x7797('0x18')][_0x7797('0x16')],_0x7797('0x19'));return _0x41b2f5[_0x7797('0x9')](0xc8)[_0x7797('0xe')]({'message':util[_0x7797('0x12')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x1512d0['params'][_0x7797('0x16')])});})['catch'](handleError(_0x41b2f5,null,_0x7797('0x10')));};
\ No newline at end of file
+var _0x9029=['length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','pid','kill','SIGINT','systeminformation','exec','../../config/logger','api','util','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','status','send','getAllData','then','catch','json','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','split'];(function(_0x2f82db,_0x2109b7){var _0x158965=function(_0x6badd9){while(--_0x6badd9){_0x2f82db['push'](_0x2f82db['shift']());}};_0x158965(++_0x2109b7);}(_0x9029,0x14a));var _0x9902=function(_0x50cb5c,_0x4d255e){_0x50cb5c=_0x50cb5c-0x0;var _0x44d84b=_0x9029[_0x50cb5c];return _0x44d84b;};'use strict';var info=require(_0x9902('0x0'));var exec=require('child_process')[_0x9902('0x1')];var logger=require(_0x9902('0x2'))(_0x9902('0x3'));var util=require(_0x9902('0x4'));var BPromise=require(_0x9902('0x5'));var _=require(_0x9902('0x6'));function handleError(_0x24d7c0,_0x31e5cf,_0x3ed87e){_0x31e5cf=_0x31e5cf||0x1f4;return function(_0x2048ac){logger[_0x9902('0x7')](_0x9902('0x8'),_0x3ed87e,_0x31e5cf,util['inspect'](_0x2048ac,{'showHidden':![],'depth':null}));delete _0x2048ac['name'];_0x24d7c0[_0x9902('0x9')](_0x31e5cf)[_0x9902('0xa')](_0x2048ac);};}exports['index']=function(_0x21540b,_0x3839b5){return info[_0x9902('0xb')]()[_0x9902('0xc')](function(_0x2380f1){return _0x3839b5[_0x9902('0x9')](0xc8)['json'](_0x2380f1);})[_0x9902('0xd')](function(_0x3932b7){return _0x3839b5[_0x9902('0x9')](0x1f4)[_0x9902('0xe')](_0x3932b7);});};exports[_0x9902('0xf')]=function(_0x51d48d,_0x1edb9e){var _0x581988=[_0x9902('0x10')];return new BPromise(function(_0x5e6498,_0x2946af){return exec(util[_0x9902('0x11')](_0x9902('0x12'),_0x51d48d[_0x9902('0x13')]['pid']),function(_0x4e033e,_0xbeb243,_0x338f63){if(_0x4e033e){return _0x2946af(_0x4e033e);}return _0x5e6498(_0xbeb243);});})[_0x9902('0xc')](function(_0x103e20){var _0x543891=![];var _0x43531e=_0x103e20[_0x9902('0x14')](/\n/);for(var _0x745c9a=0x0,_0x810a7c=_0x581988[_0x9902('0x15')];_0x745c9a<_0x810a7c,_0x543891===![];_0x745c9a+=0x1){if(_0x103e20[_0x9902('0x16')](_0x581988[_0x745c9a])>=0x0){_0x543891=!![];}}if(!_0x543891){throw new Error(util[_0x9902('0x11')](_0x9902('0x17'),_0x51d48d[_0x9902('0x13')][_0x9902('0x18')]));}process[_0x9902('0x19')](_0x51d48d[_0x9902('0x13')][_0x9902('0x18')],_0x9902('0x1a'));return _0x1edb9e['status'](0xc8)[_0x9902('0xe')]({'message':util[_0x9902('0x11')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x51d48d[_0x9902('0x13')][_0x9902('0x18')])});})['catch'](handleError(_0x1edb9e,null,'killProcess'));};
\ No newline at end of file