Built motion from commit 538092ac.|2.6.10
[motion2.git] / server / api / system / system.controller.js
index 5fc8058..111335e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6141=['name','status','send','index','getAllData','then','json','catch','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','split','length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','systeminformation','child_process','../../config/logger','api','util','bluebird','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect'];(function(_0x80e4a1,_0x349085){var _0x5fcf64=function(_0x2fb1d3){while(--_0x2fb1d3){_0x80e4a1['push'](_0x80e4a1['shift']());}};_0x5fcf64(++_0x349085);}(_0x6141,0xfc));var _0x1614=function(_0x5520e0,_0x1551c7){_0x5520e0=_0x5520e0-0x0;var _0x3cff11=_0x6141[_0x5520e0];return _0x3cff11;};'use strict';var info=require(_0x1614('0x0'));var exec=require(_0x1614('0x1'))['exec'];var logger=require(_0x1614('0x2'))(_0x1614('0x3'));var util=require(_0x1614('0x4'));var BPromise=require(_0x1614('0x5'));var _=require('lodash');function handleError(_0x441949,_0x8fb1dd,_0x284c16){_0x8fb1dd=_0x8fb1dd||0x1f4;return function(_0x398c3c){logger[_0x1614('0x6')](_0x1614('0x7'),_0x284c16,_0x8fb1dd,util[_0x1614('0x8')](_0x398c3c,{'showHidden':![],'depth':null}));delete _0x398c3c[_0x1614('0x9')];_0x441949[_0x1614('0xa')](_0x8fb1dd)[_0x1614('0xb')](_0x398c3c);};}exports[_0x1614('0xc')]=function(_0x1f1df9,_0x3226d2){return info[_0x1614('0xd')]()[_0x1614('0xe')](function(_0x30a752){return _0x3226d2['status'](0xc8)[_0x1614('0xf')](_0x30a752);})[_0x1614('0x10')](function(_0x37fedd){return _0x3226d2['status'](0x1f4)[_0x1614('0xf')](_0x37fedd);});};exports[_0x1614('0x11')]=function(_0x5e615b,_0x186ef1){var _0x2810e7=[_0x1614('0x12')];return new BPromise(function(_0x1b9a1a,_0x5edeaa){return exec(util[_0x1614('0x13')](_0x1614('0x14'),_0x5e615b[_0x1614('0x15')][_0x1614('0x16')]),function(_0x507b6d,_0x37cf46,_0x46b150){if(_0x507b6d){return _0x5edeaa(_0x507b6d);}return _0x1b9a1a(_0x37cf46);});})['then'](function(_0x1a734a){var _0x542a91=![];var _0x157e2a=_0x1a734a[_0x1614('0x17')](/\n/);for(var _0x5226c3=0x0,_0xc3cb17=_0x2810e7[_0x1614('0x18')];_0x5226c3<_0xc3cb17,_0x542a91===![];_0x5226c3+=0x1){if(_0x1a734a[_0x1614('0x19')](_0x2810e7[_0x5226c3])>=0x0){_0x542a91=!![];}}if(!_0x542a91){throw new Error(util[_0x1614('0x13')](_0x1614('0x1a'),_0x5e615b[_0x1614('0x15')]['pid']));}process['kill'](_0x5e615b['params'][_0x1614('0x16')],_0x1614('0x1b'));return _0x186ef1[_0x1614('0xa')](0xc8)[_0x1614('0xf')]({'message':util[_0x1614('0x13')](_0x1614('0x1c'),_0x5e615b[_0x1614('0x15')][_0x1614('0x16')])});})[_0x1614('0x10')](handleError(_0x186ef1,null,_0x1614('0x11')));};
\ No newline at end of file
+var _0x1f54=['format','params','pid','then','split','length','indexOf','SIGINT','json','Process\x20with\x20pid\x20%s\x20killed\x20correctly','systeminformation','../../config/logger','api','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','name','status','send','index','getAllData','killProcess'];(function(_0xd02bb,_0x26e2d0){var _0x1cdf23=function(_0x18fd05){while(--_0x18fd05){_0xd02bb['push'](_0xd02bb['shift']());}};_0x1cdf23(++_0x26e2d0);}(_0x1f54,0x122));var _0x41f5=function(_0x36211c,_0x178508){_0x36211c=_0x36211c-0x0;var _0xd2487b=_0x1f54[_0x36211c];return _0xd2487b;};'use strict';var info=require(_0x41f5('0x0'));var exec=require('child_process')['exec'];var logger=require(_0x41f5('0x1'))(_0x41f5('0x2'));var util=require('util');var BPromise=require('bluebird');var _=require('lodash');function handleError(_0xaf5c70,_0x30385f,_0x46a440){_0x30385f=_0x30385f||0x1f4;return function(_0x1915e2){logger['error'](_0x41f5('0x3'),_0x46a440,_0x30385f,util['inspect'](_0x1915e2,{'showHidden':![],'depth':null}));delete _0x1915e2[_0x41f5('0x4')];_0xaf5c70[_0x41f5('0x5')](_0x30385f)[_0x41f5('0x6')](_0x1915e2);};}exports[_0x41f5('0x7')]=function(_0xcc62ab,_0x4dcd68){return info[_0x41f5('0x8')]()['then'](function(_0x248ae9){return _0x4dcd68[_0x41f5('0x5')](0xc8)['json'](_0x248ae9);})['catch'](function(_0x77854c){return _0x4dcd68[_0x41f5('0x5')](0x1f4)['json'](_0x77854c);});};exports[_0x41f5('0x9')]=function(_0x4e48de,_0x161cda){var _0x2b752a=['components/import/cm'];return new BPromise(function(_0x4b6022,_0x5ab289){return exec(util[_0x41f5('0xa')]('ps\x20-p\x20%s\x20-ww\x20-o\x20args',_0x4e48de[_0x41f5('0xb')][_0x41f5('0xc')]),function(_0x5afa2f,_0x425c6f,_0x69ef93){if(_0x5afa2f){return _0x5ab289(_0x5afa2f);}return _0x4b6022(_0x425c6f);});})[_0x41f5('0xd')](function(_0x3e21f){var _0x5e1dbd=![];var _0x164ab9=_0x3e21f[_0x41f5('0xe')](/\n/);for(var _0x440cf5=0x0,_0x4bf18d=_0x2b752a[_0x41f5('0xf')];_0x440cf5<_0x4bf18d,_0x5e1dbd===![];_0x440cf5+=0x1){if(_0x3e21f[_0x41f5('0x10')](_0x2b752a[_0x440cf5])>=0x0){_0x5e1dbd=!![];}}if(!_0x5e1dbd){throw new Error(util[_0x41f5('0xa')]('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x4e48de[_0x41f5('0xb')][_0x41f5('0xc')]));}process['kill'](_0x4e48de[_0x41f5('0xb')][_0x41f5('0xc')],_0x41f5('0x11'));return _0x161cda[_0x41f5('0x5')](0xc8)[_0x41f5('0x12')]({'message':util[_0x41f5('0xa')](_0x41f5('0x13'),_0x4e48de['params']['pid'])});})['catch'](handleError(_0x161cda,null,_0x41f5('0x9')));};
\ No newline at end of file