Built motion from commit 1ea47bf4.|2.6.34
[motion2.git] / server / api / system / system.controller.js
index c895127..6120614 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x575c=['name','status','send','index','then','json','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!','kill','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','catch','killProcess','systeminformation','child_process','api','util','lodash','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s'];(function(_0x173441,_0x26b0d9){var _0x2423a8=function(_0x4d96c2){while(--_0x4d96c2){_0x173441['push'](_0x173441['shift']());}};_0x2423a8(++_0x26b0d9);}(_0x575c,0x96));var _0xc575=function(_0x2c62c9,_0x2293bc){_0x2c62c9=_0x2c62c9-0x0;var _0x1c6cbe=_0x575c[_0x2c62c9];return _0x1c6cbe;};'use strict';var info=require(_0xc575('0x0'));var exec=require(_0xc575('0x1'))['exec'];var logger=require('../../config/logger')(_0xc575('0x2'));var util=require(_0xc575('0x3'));var BPromise=require('bluebird');var _=require(_0xc575('0x4'));function handleError(_0x18599d,_0x5b2a9d,_0x54f76a){_0x5b2a9d=_0x5b2a9d||0x1f4;return function(_0x3b1e61){logger['error'](_0xc575('0x5'),_0x54f76a,_0x5b2a9d,util['inspect'](_0x3b1e61,{'showHidden':![],'depth':null}));delete _0x3b1e61[_0xc575('0x6')];_0x18599d[_0xc575('0x7')](_0x5b2a9d)[_0xc575('0x8')](_0x3b1e61);};}exports[_0xc575('0x9')]=function(_0xb55f4,_0x533883){return info['getAllData']()[_0xc575('0xa')](function(_0x4edf68){return _0x533883[_0xc575('0x7')](0xc8)[_0xc575('0xb')](_0x4edf68);})['catch'](function(_0x361a1b){return _0x533883[_0xc575('0x7')](0x1f4)[_0xc575('0xb')](_0x361a1b);});};exports['killProcess']=function(_0x11820,_0x23e5b8){var _0x5eb967=[_0xc575('0xc')];return new BPromise(function(_0x58da00,_0x505119){return exec(util[_0xc575('0xd')](_0xc575('0xe'),_0x11820[_0xc575('0xf')][_0xc575('0x10')]),function(_0x33302c,_0x3dbf0e,_0x5ee113){if(_0x33302c){return _0x505119(_0x33302c);}return _0x58da00(_0x3dbf0e);});})[_0xc575('0xa')](function(_0x26350a){var _0x2f6400=![];var _0x1487d7=_0x26350a[_0xc575('0x11')](/\n/);for(var _0x128bdf=0x0,_0x19c2cf=_0x5eb967[_0xc575('0x12')];_0x128bdf<_0x19c2cf,_0x2f6400===![];_0x128bdf+=0x1){if(_0x26350a[_0xc575('0x13')](_0x5eb967[_0x128bdf])>=0x0){_0x2f6400=!![];}}if(!_0x2f6400){throw new Error(util[_0xc575('0xd')](_0xc575('0x14'),_0x11820[_0xc575('0xf')]['pid']));}process[_0xc575('0x15')](_0x11820[_0xc575('0xf')][_0xc575('0x10')],_0xc575('0x16'));return _0x23e5b8[_0xc575('0x7')](0xc8)[_0xc575('0xb')]({'message':util[_0xc575('0xd')](_0xc575('0x17'),_0x11820[_0xc575('0xf')]['pid'])});})[_0xc575('0x18')](handleError(_0x23e5b8,null,_0xc575('0x19')));};
\ No newline at end of file
+var _0x9051=['status','send','index','getAllData','then','json','catch','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','length','kill','Process\x20with\x20pid\x20%s\x20killed\x20correctly','child_process','exec','api','bluebird','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s'];(function(_0xb491c,_0x54029a){var _0x121f8d=function(_0x3dac80){while(--_0x3dac80){_0xb491c['push'](_0xb491c['shift']());}};_0x121f8d(++_0x54029a);}(_0x9051,0xd6));var _0x1905=function(_0x170cf5,_0x33f192){_0x170cf5=_0x170cf5-0x0;var _0x1d36c5=_0x9051[_0x170cf5];return _0x1d36c5;};'use strict';var info=require('systeminformation');var exec=require(_0x1905('0x0'))[_0x1905('0x1')];var logger=require('../../config/logger')(_0x1905('0x2'));var util=require('util');var BPromise=require(_0x1905('0x3'));var _=require('lodash');function handleError(_0x16f390,_0x49da9d,_0x4a231e){_0x49da9d=_0x49da9d||0x1f4;return function(_0x5ca6b9){logger[_0x1905('0x4')](_0x1905('0x5'),_0x4a231e,_0x49da9d,util['inspect'](_0x5ca6b9,{'showHidden':![],'depth':null}));delete _0x5ca6b9['name'];_0x16f390[_0x1905('0x6')](_0x49da9d)[_0x1905('0x7')](_0x5ca6b9);};}exports[_0x1905('0x8')]=function(_0x138e85,_0x57ffbf){return info[_0x1905('0x9')]()[_0x1905('0xa')](function(_0x30898a){return _0x57ffbf['status'](0xc8)[_0x1905('0xb')](_0x30898a);})[_0x1905('0xc')](function(_0xf3ab0e){return _0x57ffbf[_0x1905('0x6')](0x1f4)[_0x1905('0xb')](_0xf3ab0e);});};exports[_0x1905('0xd')]=function(_0x1fe68f,_0x5a0b04){var _0x5019ac=[_0x1905('0xe')];return new BPromise(function(_0xd724c1,_0x71b935){return exec(util[_0x1905('0xf')](_0x1905('0x10'),_0x1fe68f[_0x1905('0x11')][_0x1905('0x12')]),function(_0x3fefad,_0x14c4bf,_0x41601e){if(_0x3fefad){return _0x71b935(_0x3fefad);}return _0xd724c1(_0x14c4bf);});})[_0x1905('0xa')](function(_0x4eae7){var _0x4b5d38=![];var _0x396c03=_0x4eae7['split'](/\n/);for(var _0x11c050=0x0,_0x522ec2=_0x5019ac[_0x1905('0x13')];_0x11c050<_0x522ec2,_0x4b5d38===![];_0x11c050+=0x1){if(_0x4eae7['indexOf'](_0x5019ac[_0x11c050])>=0x0){_0x4b5d38=!![];}}if(!_0x4b5d38){throw new Error(util['format']('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x1fe68f[_0x1905('0x11')][_0x1905('0x12')]));}process[_0x1905('0x14')](_0x1fe68f[_0x1905('0x11')][_0x1905('0x12')],'SIGINT');return _0x5a0b04[_0x1905('0x6')](0xc8)[_0x1905('0xb')]({'message':util[_0x1905('0xf')](_0x1905('0x15'),_0x1fe68f['params'][_0x1905('0x12')])});})[_0x1905('0xc')](handleError(_0x5a0b04,null,_0x1905('0xd')));};
\ No newline at end of file