Built motion from commit 4d4d9a88.|2.6.26
[motion2.git] / server / api / system / system.controller.js
index 888d32f..a8d6667 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x41ae=['SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','systeminformation','child_process','exec','api','util','lodash','inspect','name','index','getAllData','then','status','json','catch','killProcess','components/import/cm','format','pid','split','length','indexOf','params','kill'];(function(_0x71ae3c,_0x404627){var _0x194072=function(_0x13c008){while(--_0x13c008){_0x71ae3c['push'](_0x71ae3c['shift']());}};_0x194072(++_0x404627);}(_0x41ae,0x1ab));var _0xe41a=function(_0x5c1300,_0x3bcd37){_0x5c1300=_0x5c1300-0x0;var _0x325d53=_0x41ae[_0x5c1300];return _0x325d53;};'use strict';var info=require(_0xe41a('0x0'));var exec=require(_0xe41a('0x1'))[_0xe41a('0x2')];var logger=require('../../config/logger')(_0xe41a('0x3'));var util=require(_0xe41a('0x4'));var BPromise=require('bluebird');var _=require(_0xe41a('0x5'));function handleError(_0x5b67f7,_0x235343,_0x20dc71){_0x235343=_0x235343||0x1f4;return function(_0x9da3b3){logger['error']('<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s',_0x20dc71,_0x235343,util[_0xe41a('0x6')](_0x9da3b3,{'showHidden':![],'depth':null}));delete _0x9da3b3[_0xe41a('0x7')];_0x5b67f7['status'](_0x235343)['send'](_0x9da3b3);};}exports[_0xe41a('0x8')]=function(_0x175b67,_0x1d2be0){return info[_0xe41a('0x9')]()[_0xe41a('0xa')](function(_0x353786){return _0x1d2be0[_0xe41a('0xb')](0xc8)[_0xe41a('0xc')](_0x353786);})[_0xe41a('0xd')](function(_0x340a33){return _0x1d2be0[_0xe41a('0xb')](0x1f4)['json'](_0x340a33);});};exports[_0xe41a('0xe')]=function(_0x48cd4a,_0x1fc15a){var _0x4f42a0=[_0xe41a('0xf')];return new BPromise(function(_0x3f0da2,_0x48285e){return exec(util[_0xe41a('0x10')]('ps\x20-p\x20%s\x20-ww\x20-o\x20args',_0x48cd4a['params'][_0xe41a('0x11')]),function(_0x3b6f8c,_0x3beb42,_0x96d885){if(_0x3b6f8c){return _0x48285e(_0x3b6f8c);}return _0x3f0da2(_0x3beb42);});})[_0xe41a('0xa')](function(_0x283e3c){var _0x12152e=![];var _0x4f0016=_0x283e3c[_0xe41a('0x12')](/\n/);for(var _0x4eedc0=0x0,_0x48be0c=_0x4f42a0[_0xe41a('0x13')];_0x4eedc0<_0x48be0c,_0x12152e===![];_0x4eedc0+=0x1){if(_0x283e3c[_0xe41a('0x14')](_0x4f42a0[_0x4eedc0])>=0x0){_0x12152e=!![];}}if(!_0x12152e){throw new Error(util[_0xe41a('0x10')]('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x48cd4a[_0xe41a('0x15')]['pid']));}process[_0xe41a('0x16')](_0x48cd4a[_0xe41a('0x15')][_0xe41a('0x11')],_0xe41a('0x17'));return _0x1fc15a['status'](0xc8)['json']({'message':util['format'](_0xe41a('0x18'),_0x48cd4a['params'][_0xe41a('0x11')])});})[_0xe41a('0xd')](handleError(_0x1fc15a,null,'killProcess'));};
\ No newline at end of file
+var _0xedb5=['kill','params','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','killProcess','child_process','exec','../../config/logger','util','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','name','status','getAllData','then','json','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','pid','split','length','Process\x20with\x20pid\x20%s\x20not\x20found!'];(function(_0x1ad7fc,_0x444145){var _0x3bb433=function(_0x1e27ef){while(--_0x1e27ef){_0x1ad7fc['push'](_0x1ad7fc['shift']());}};_0x3bb433(++_0x444145);}(_0xedb5,0x131));var _0x5edb=function(_0x122e2c,_0x49ca1a){_0x122e2c=_0x122e2c-0x0;var _0x652295=_0xedb5[_0x122e2c];return _0x652295;};'use strict';var info=require('systeminformation');var exec=require(_0x5edb('0x0'))[_0x5edb('0x1')];var logger=require(_0x5edb('0x2'))('api');var util=require(_0x5edb('0x3'));var BPromise=require(_0x5edb('0x4'));var _=require(_0x5edb('0x5'));function handleError(_0x474766,_0x539835,_0x183ee0){_0x539835=_0x539835||0x1f4;return function(_0x35355c){logger[_0x5edb('0x6')](_0x5edb('0x7'),_0x183ee0,_0x539835,util['inspect'](_0x35355c,{'showHidden':![],'depth':null}));delete _0x35355c[_0x5edb('0x8')];_0x474766[_0x5edb('0x9')](_0x539835)['send'](_0x35355c);};}exports['index']=function(_0x3704f6,_0x19b945){return info[_0x5edb('0xa')]()[_0x5edb('0xb')](function(_0x3612d6){return _0x19b945[_0x5edb('0x9')](0xc8)['json'](_0x3612d6);})['catch'](function(_0x2e195d){return _0x19b945[_0x5edb('0x9')](0x1f4)[_0x5edb('0xc')](_0x2e195d);});};exports['killProcess']=function(_0x4be9ee,_0x3ca996){var _0x3a0fa7=[_0x5edb('0xd')];return new BPromise(function(_0x2e344c,_0x33db6a){return exec(util[_0x5edb('0xe')](_0x5edb('0xf'),_0x4be9ee['params'][_0x5edb('0x10')]),function(_0x31595d,_0xa036b2,_0x2a4262){if(_0x31595d){return _0x33db6a(_0x31595d);}return _0x2e344c(_0xa036b2);});})[_0x5edb('0xb')](function(_0x1d2dac){var _0x5719b6=![];var _0x4ed3f4=_0x1d2dac[_0x5edb('0x11')](/\n/);for(var _0x6f9d9b=0x0,_0x348a95=_0x3a0fa7[_0x5edb('0x12')];_0x6f9d9b<_0x348a95,_0x5719b6===![];_0x6f9d9b+=0x1){if(_0x1d2dac['indexOf'](_0x3a0fa7[_0x6f9d9b])>=0x0){_0x5719b6=!![];}}if(!_0x5719b6){throw new Error(util['format'](_0x5edb('0x13'),_0x4be9ee['params'][_0x5edb('0x10')]));}process[_0x5edb('0x14')](_0x4be9ee[_0x5edb('0x15')][_0x5edb('0x10')],_0x5edb('0x16'));return _0x3ca996[_0x5edb('0x9')](0xc8)['json']({'message':util[_0x5edb('0xe')](_0x5edb('0x17'),_0x4be9ee[_0x5edb('0x15')][_0x5edb('0x10')])});})['catch'](handleError(_0x3ca996,null,_0x5edb('0x18')));};
\ No newline at end of file