Built motion from commit 21186556.|2.6.19
[motion2.git] / server / api / system / system.controller.js
index c2c9f90..3dbbcb2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4eb4=['exec','../../config/logger','util','bluebird','lodash','name','status','index','getAllData','then','json','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','split','length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','pid','kill','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','catch'];(function(_0x4e0bc4,_0x30ea10){var _0x3943ec=function(_0x4c4253){while(--_0x4c4253){_0x4e0bc4['push'](_0x4e0bc4['shift']());}};_0x3943ec(++_0x30ea10);}(_0x4eb4,0x1f4));var _0x44eb=function(_0x595bd1,_0xb1e7a){_0x595bd1=_0x595bd1-0x0;var _0xd0344f=_0x4eb4[_0x595bd1];return _0xd0344f;};'use strict';var info=require('systeminformation');var exec=require('child_process')[_0x44eb('0x0')];var logger=require(_0x44eb('0x1'))('api');var util=require(_0x44eb('0x2'));var BPromise=require(_0x44eb('0x3'));var _=require(_0x44eb('0x4'));function handleError(_0x1af09a,_0x1818bb,_0x246827){_0x1818bb=_0x1818bb||0x1f4;return function(_0x5933ff){logger['error']('<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s',_0x246827,_0x1818bb,util['inspect'](_0x5933ff,{'showHidden':![],'depth':null}));delete _0x5933ff[_0x44eb('0x5')];_0x1af09a[_0x44eb('0x6')](_0x1818bb)['send'](_0x5933ff);};}exports[_0x44eb('0x7')]=function(_0x5c7233,_0x4d473a){return info[_0x44eb('0x8')]()[_0x44eb('0x9')](function(_0x233c6d){return _0x4d473a[_0x44eb('0x6')](0xc8)[_0x44eb('0xa')](_0x233c6d);})['catch'](function(_0x3f2eaf){return _0x4d473a[_0x44eb('0x6')](0x1f4)['json'](_0x3f2eaf);});};exports[_0x44eb('0xb')]=function(_0x29d295,_0x2f327c){var _0x312d78=[_0x44eb('0xc')];return new BPromise(function(_0x2dc3ae,_0x276ea8){return exec(util[_0x44eb('0xd')](_0x44eb('0xe'),_0x29d295[_0x44eb('0xf')]['pid']),function(_0x4c9358,_0x57986a,_0x4b1203){if(_0x4c9358){return _0x276ea8(_0x4c9358);}return _0x2dc3ae(_0x57986a);});})[_0x44eb('0x9')](function(_0x380ad3){var _0x294516=![];var _0x1edf71=_0x380ad3[_0x44eb('0x10')](/\n/);for(var _0x2cdc5e=0x0,_0x40bdb1=_0x312d78[_0x44eb('0x11')];_0x2cdc5e<_0x40bdb1,_0x294516===![];_0x2cdc5e+=0x1){if(_0x380ad3[_0x44eb('0x12')](_0x312d78[_0x2cdc5e])>=0x0){_0x294516=!![];}}if(!_0x294516){throw new Error(util['format'](_0x44eb('0x13'),_0x29d295[_0x44eb('0xf')][_0x44eb('0x14')]));}process[_0x44eb('0x15')](_0x29d295[_0x44eb('0xf')][_0x44eb('0x14')],_0x44eb('0x16'));return _0x2f327c[_0x44eb('0x6')](0xc8)[_0x44eb('0xa')]({'message':util['format'](_0x44eb('0x17'),_0x29d295[_0x44eb('0xf')][_0x44eb('0x14')])});})[_0x44eb('0x18')](handleError(_0x2f327c,null,_0x44eb('0xb')));};
\ No newline at end of file
+var _0x535d=['error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','status','send','index','getAllData','catch','json','killProcess','components/import/cm','format','pid','split','length','indexOf','params','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','systeminformation','child_process','../../config/logger','api','util','bluebird','lodash'];(function(_0x295b61,_0x808c6c){var _0x1f9558=function(_0x48a496){while(--_0x48a496){_0x295b61['push'](_0x295b61['shift']());}};_0x1f9558(++_0x808c6c);}(_0x535d,0xd1));var _0xd535=function(_0x48534e,_0x54ebb0){_0x48534e=_0x48534e-0x0;var _0x26f36c=_0x535d[_0x48534e];return _0x26f36c;};'use strict';var info=require(_0xd535('0x0'));var exec=require(_0xd535('0x1'))['exec'];var logger=require(_0xd535('0x2'))(_0xd535('0x3'));var util=require(_0xd535('0x4'));var BPromise=require(_0xd535('0x5'));var _=require(_0xd535('0x6'));function handleError(_0x1c3c6c,_0x40a4e0,_0x1be627){_0x40a4e0=_0x40a4e0||0x1f4;return function(_0x56c917){logger[_0xd535('0x7')](_0xd535('0x8'),_0x1be627,_0x40a4e0,util[_0xd535('0x9')](_0x56c917,{'showHidden':![],'depth':null}));delete _0x56c917[_0xd535('0xa')];_0x1c3c6c[_0xd535('0xb')](_0x40a4e0)[_0xd535('0xc')](_0x56c917);};}exports[_0xd535('0xd')]=function(_0x46745b,_0x462503){return info[_0xd535('0xe')]()['then'](function(_0x278a71){return _0x462503[_0xd535('0xb')](0xc8)['json'](_0x278a71);})[_0xd535('0xf')](function(_0x376f91){return _0x462503[_0xd535('0xb')](0x1f4)[_0xd535('0x10')](_0x376f91);});};exports[_0xd535('0x11')]=function(_0x5b9fb5,_0x2330f1){var _0x4b1751=[_0xd535('0x12')];return new BPromise(function(_0x500b4d,_0x574bd0){return exec(util[_0xd535('0x13')]('ps\x20-p\x20%s\x20-ww\x20-o\x20args',_0x5b9fb5['params'][_0xd535('0x14')]),function(_0x13b05e,_0xe5451d,_0x506d54){if(_0x13b05e){return _0x574bd0(_0x13b05e);}return _0x500b4d(_0xe5451d);});})['then'](function(_0x5c2b8d){var _0x3e424f=![];var _0x503cd3=_0x5c2b8d[_0xd535('0x15')](/\n/);for(var _0x50bf65=0x0,_0x42f9d5=_0x4b1751[_0xd535('0x16')];_0x50bf65<_0x42f9d5,_0x3e424f===![];_0x50bf65+=0x1){if(_0x5c2b8d[_0xd535('0x17')](_0x4b1751[_0x50bf65])>=0x0){_0x3e424f=!![];}}if(!_0x3e424f){throw new Error(util['format']('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x5b9fb5[_0xd535('0x18')][_0xd535('0x14')]));}process['kill'](_0x5b9fb5[_0xd535('0x18')][_0xd535('0x14')],_0xd535('0x19'));return _0x2330f1[_0xd535('0xb')](0xc8)[_0xd535('0x10')]({'message':util[_0xd535('0x13')](_0xd535('0x1a'),_0x5b9fb5[_0xd535('0x18')]['pid'])});})[_0xd535('0xf')](handleError(_0x2330f1,null,'killProcess'));};
\ No newline at end of file