Built motion from commit (unavailable).|2.3.4
[motion2.git] / server / api / system / system.controller.js
index b8ba766..c70ca80 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd81a=['status','send','index','getAllData','then','json','catch','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','split','length','indexOf','format','kill','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','killProcess','systeminformation','child_process','exec','../../config/logger','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name'];(function(_0x50dab7,_0x34e5bc){var _0x2268cc=function(_0xd0d624){while(--_0xd0d624){_0x50dab7['push'](_0x50dab7['shift']());}};_0x2268cc(++_0x34e5bc);}(_0xd81a,0x1ee));var _0xad81=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0xd81a[_0x5ddb1c];return _0x354adc;};'use strict';var info=require(_0xad81('0x0'));var exec=require(_0xad81('0x1'))[_0xad81('0x2')];var logger=require(_0xad81('0x3'))('api');var util=require('util');var BPromise=require(_0xad81('0x4'));var _=require(_0xad81('0x5'));function handleError(_0x3f8fb7,_0x2f469c,_0xca5387){_0x2f469c=_0x2f469c||0x1f4;return function(_0x495c89){logger[_0xad81('0x6')](_0xad81('0x7'),_0xca5387,_0x2f469c,util[_0xad81('0x8')](_0x495c89,{'showHidden':![],'depth':null}));delete _0x495c89[_0xad81('0x9')];_0x3f8fb7[_0xad81('0xa')](_0x2f469c)[_0xad81('0xb')](_0x495c89);};}exports[_0xad81('0xc')]=function(_0x190cd5,_0x1e42a7){return info[_0xad81('0xd')]()[_0xad81('0xe')](function(_0x384c12){return _0x1e42a7[_0xad81('0xa')](0xc8)[_0xad81('0xf')](_0x384c12);})[_0xad81('0x10')](function(_0x8a8eb6){return _0x1e42a7['status'](0x1f4)['json'](_0x8a8eb6);});};exports['killProcess']=function(_0x1a7d73,_0x36785c){var _0x409fd0=['components/import/cm'];return new BPromise(function(_0x1e1d0e,_0x2f60b7){return exec(util['format'](_0xad81('0x11'),_0x1a7d73[_0xad81('0x12')][_0xad81('0x13')]),function(_0x351a2c,_0x2cc8e4,_0x3f4bd1){if(_0x351a2c){return _0x2f60b7(_0x351a2c);}return _0x1e1d0e(_0x2cc8e4);});})['then'](function(_0x500b95){var _0xe97f8c=![];var _0x3e4f0a=_0x500b95[_0xad81('0x14')](/\n/);for(var _0x3ad214=0x0,_0x46257f=_0x409fd0[_0xad81('0x15')];_0x3ad214<_0x46257f,_0xe97f8c===![];_0x3ad214+=0x1){if(_0x500b95[_0xad81('0x16')](_0x409fd0[_0x3ad214])>=0x0){_0xe97f8c=!![];}}if(!_0xe97f8c){throw new Error(util[_0xad81('0x17')]('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x1a7d73['params'][_0xad81('0x13')]));}process[_0xad81('0x18')](_0x1a7d73[_0xad81('0x12')][_0xad81('0x13')],_0xad81('0x19'));return _0x36785c[_0xad81('0xa')](0xc8)[_0xad81('0xf')]({'message':util[_0xad81('0x17')](_0xad81('0x1a'),_0x1a7d73[_0xad81('0x12')][_0xad81('0x13')])});})[_0xad81('0x10')](handleError(_0x36785c,null,_0xad81('0x1b')));};
\ No newline at end of file
+var _0x85ed=['params','pid','kill','SIGINT','json','Process\x20with\x20pid\x20%s\x20killed\x20correctly','catch','systeminformation','exec','../../config/logger','api','util','bluebird','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','send','index','getAllData','then','status','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','split','length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!'];(function(_0x1f8ec0,_0x933b58){var _0x5f4c0e=function(_0x23a18f){while(--_0x23a18f){_0x1f8ec0['push'](_0x1f8ec0['shift']());}};_0x5f4c0e(++_0x933b58);}(_0x85ed,0x7b));var _0xd85e=function(_0x265aa2,_0x220072){_0x265aa2=_0x265aa2-0x0;var _0x447a3a=_0x85ed[_0x265aa2];return _0x447a3a;};'use strict';var info=require(_0xd85e('0x0'));var exec=require('child_process')[_0xd85e('0x1')];var logger=require(_0xd85e('0x2'))(_0xd85e('0x3'));var util=require(_0xd85e('0x4'));var BPromise=require(_0xd85e('0x5'));var _=require('lodash');function handleError(_0xaa30d0,_0x2922c3,_0x26ba69){_0x2922c3=_0x2922c3||0x1f4;return function(_0x5b0b4a){logger['error'](_0xd85e('0x6'),_0x26ba69,_0x2922c3,util[_0xd85e('0x7')](_0x5b0b4a,{'showHidden':![],'depth':null}));delete _0x5b0b4a[_0xd85e('0x8')];_0xaa30d0['status'](_0x2922c3)[_0xd85e('0x9')](_0x5b0b4a);};}exports[_0xd85e('0xa')]=function(_0x12e78f,_0x4dbbd4){return info[_0xd85e('0xb')]()[_0xd85e('0xc')](function(_0x262af4){return _0x4dbbd4['status'](0xc8)['json'](_0x262af4);})['catch'](function(_0x2208b5){return _0x4dbbd4[_0xd85e('0xd')](0x1f4)['json'](_0x2208b5);});};exports[_0xd85e('0xe')]=function(_0x1996a0,_0x246be2){var _0xe610f4=[_0xd85e('0xf')];return new BPromise(function(_0x5a12ab,_0x91d8e){return exec(util[_0xd85e('0x10')](_0xd85e('0x11'),_0x1996a0['params']['pid']),function(_0x134b2f,_0xc5ba92,_0x4c8e83){if(_0x134b2f){return _0x91d8e(_0x134b2f);}return _0x5a12ab(_0xc5ba92);});})[_0xd85e('0xc')](function(_0x4df41c){var _0x31de42=![];var _0x32f57b=_0x4df41c[_0xd85e('0x12')](/\n/);for(var _0x42a565=0x0,_0x298862=_0xe610f4[_0xd85e('0x13')];_0x42a565<_0x298862,_0x31de42===![];_0x42a565+=0x1){if(_0x4df41c[_0xd85e('0x14')](_0xe610f4[_0x42a565])>=0x0){_0x31de42=!![];}}if(!_0x31de42){throw new Error(util[_0xd85e('0x10')](_0xd85e('0x15'),_0x1996a0[_0xd85e('0x16')][_0xd85e('0x17')]));}process[_0xd85e('0x18')](_0x1996a0[_0xd85e('0x16')][_0xd85e('0x17')],_0xd85e('0x19'));return _0x246be2['status'](0xc8)[_0xd85e('0x1a')]({'message':util[_0xd85e('0x10')](_0xd85e('0x1b'),_0x1996a0[_0xd85e('0x16')][_0xd85e('0x17')])});})[_0xd85e('0x1c')](handleError(_0x246be2,null,_0xd85e('0xe')));};
\ No newline at end of file