Built motion from commit ff78e754.|2.6.29
[motion2.git] / server / api / system / system.controller.js
index acf3525..159d04d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x302e=['exec','../../config/logger','api','util','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','status','index','getAllData','then','catch','json','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','pid','split','length','Process\x20with\x20pid\x20%s\x20not\x20found!','kill','params','Process\x20with\x20pid\x20%s\x20killed\x20correctly','child_process'];(function(_0x26f2a3,_0x324e2d){var _0x2a9969=function(_0x3cc464){while(--_0x3cc464){_0x26f2a3['push'](_0x26f2a3['shift']());}};_0x2a9969(++_0x324e2d);}(_0x302e,0x6b));var _0xe302=function(_0x56c4e6,_0xb1ca09){_0x56c4e6=_0x56c4e6-0x0;var _0x34859b=_0x302e[_0x56c4e6];return _0x34859b;};'use strict';var info=require('systeminformation');var exec=require(_0xe302('0x0'))[_0xe302('0x1')];var logger=require(_0xe302('0x2'))(_0xe302('0x3'));var util=require(_0xe302('0x4'));var BPromise=require(_0xe302('0x5'));var _=require(_0xe302('0x6'));function handleError(_0xe57169,_0x427172,_0x148178){_0x427172=_0x427172||0x1f4;return function(_0x5d252b){logger[_0xe302('0x7')](_0xe302('0x8'),_0x148178,_0x427172,util[_0xe302('0x9')](_0x5d252b,{'showHidden':![],'depth':null}));delete _0x5d252b['name'];_0xe57169[_0xe302('0xa')](_0x427172)['send'](_0x5d252b);};}exports[_0xe302('0xb')]=function(_0xba6d90,_0x455c26){return info[_0xe302('0xc')]()[_0xe302('0xd')](function(_0x590df3){return _0x455c26[_0xe302('0xa')](0xc8)['json'](_0x590df3);})[_0xe302('0xe')](function(_0x80a8bc){return _0x455c26[_0xe302('0xa')](0x1f4)[_0xe302('0xf')](_0x80a8bc);});};exports[_0xe302('0x10')]=function(_0x947b1,_0x1804e){var _0x1ed3dd=[_0xe302('0x11')];return new BPromise(function(_0x3a88e4,_0x3547e4){return exec(util[_0xe302('0x12')](_0xe302('0x13'),_0x947b1['params'][_0xe302('0x14')]),function(_0x577c5b,_0x3526f3,_0x3142c2){if(_0x577c5b){return _0x3547e4(_0x577c5b);}return _0x3a88e4(_0x3526f3);});})['then'](function(_0x54b155){var _0x26b8e0=![];var _0x16750a=_0x54b155[_0xe302('0x15')](/\n/);for(var _0x31f4ad=0x0,_0x2021e1=_0x1ed3dd[_0xe302('0x16')];_0x31f4ad<_0x2021e1,_0x26b8e0===![];_0x31f4ad+=0x1){if(_0x54b155['indexOf'](_0x1ed3dd[_0x31f4ad])>=0x0){_0x26b8e0=!![];}}if(!_0x26b8e0){throw new Error(util['format'](_0xe302('0x17'),_0x947b1['params'][_0xe302('0x14')]));}process[_0xe302('0x18')](_0x947b1[_0xe302('0x19')][_0xe302('0x14')],'SIGINT');return _0x1804e[_0xe302('0xa')](0xc8)[_0xe302('0xf')]({'message':util['format'](_0xe302('0x1a'),_0x947b1[_0xe302('0x19')]['pid'])});})[_0xe302('0xe')](handleError(_0x1804e,null,'killProcess'));};
\ No newline at end of file
+var _0xa338=['<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','status','send','index','then','json','killProcess','components/import/cm','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','split','length','indexOf','format','Process\x20with\x20pid\x20%s\x20not\x20found!','kill','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','pid','catch','exec','../../config/logger','api','util','bluebird','lodash'];(function(_0x1a300b,_0x39c076){var _0x2125e2=function(_0x38d251){while(--_0x38d251){_0x1a300b['push'](_0x1a300b['shift']());}};_0x2125e2(++_0x39c076);}(_0xa338,0x14c));var _0x8a33=function(_0x5a105f,_0xe19099){_0x5a105f=_0x5a105f-0x0;var _0x2f3e4c=_0xa338[_0x5a105f];return _0x2f3e4c;};'use strict';var info=require('systeminformation');var exec=require('child_process')[_0x8a33('0x0')];var logger=require(_0x8a33('0x1'))(_0x8a33('0x2'));var util=require(_0x8a33('0x3'));var BPromise=require(_0x8a33('0x4'));var _=require(_0x8a33('0x5'));function handleError(_0xb8aec7,_0x2cc769,_0x171f72){_0x2cc769=_0x2cc769||0x1f4;return function(_0x4e9cd4){logger['error'](_0x8a33('0x6'),_0x171f72,_0x2cc769,util['inspect'](_0x4e9cd4,{'showHidden':![],'depth':null}));delete _0x4e9cd4['name'];_0xb8aec7[_0x8a33('0x7')](_0x2cc769)[_0x8a33('0x8')](_0x4e9cd4);};}exports[_0x8a33('0x9')]=function(_0x7f33b9,_0x44db69){return info['getAllData']()[_0x8a33('0xa')](function(_0x4fa416){return _0x44db69[_0x8a33('0x7')](0xc8)[_0x8a33('0xb')](_0x4fa416);})['catch'](function(_0x201fda){return _0x44db69[_0x8a33('0x7')](0x1f4)[_0x8a33('0xb')](_0x201fda);});};exports[_0x8a33('0xc')]=function(_0x3e047d,_0x12b56d){var _0x5daf6f=[_0x8a33('0xd')];return new BPromise(function(_0x4d2053,_0x53c906){return exec(util['format'](_0x8a33('0xe'),_0x3e047d[_0x8a33('0xf')]['pid']),function(_0x17d082,_0x53b109,_0x30c18d){if(_0x17d082){return _0x53c906(_0x17d082);}return _0x4d2053(_0x53b109);});})[_0x8a33('0xa')](function(_0xa5104e){var _0x106726=![];var _0x35ad24=_0xa5104e[_0x8a33('0x10')](/\n/);for(var _0x30708a=0x0,_0x199b76=_0x5daf6f[_0x8a33('0x11')];_0x30708a<_0x199b76,_0x106726===![];_0x30708a+=0x1){if(_0xa5104e[_0x8a33('0x12')](_0x5daf6f[_0x30708a])>=0x0){_0x106726=!![];}}if(!_0x106726){throw new Error(util[_0x8a33('0x13')](_0x8a33('0x14'),_0x3e047d['params']['pid']));}process[_0x8a33('0x15')](_0x3e047d[_0x8a33('0xf')]['pid'],_0x8a33('0x16'));return _0x12b56d[_0x8a33('0x7')](0xc8)[_0x8a33('0xb')]({'message':util[_0x8a33('0x13')](_0x8a33('0x17'),_0x3e047d[_0x8a33('0xf')][_0x8a33('0x18')])});})[_0x8a33('0x19')](handleError(_0x12b56d,null,_0x8a33('0xc')));};
\ No newline at end of file