Built motion from commit f25620e4.|2.6.30
[motion2.git] / server / api / system / system.controller.js
index a06c9b2..889e08e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8bdf=['getAllData','json','catch','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','split','length','Process\x20with\x20pid\x20%s\x20not\x20found!','kill','SIGINT','systeminformation','exec','api','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','status','send'];(function(_0x2f54b6,_0x3cc6cb){var _0x169f21=function(_0x4dac27){while(--_0x4dac27){_0x2f54b6['push'](_0x2f54b6['shift']());}};_0x169f21(++_0x3cc6cb);}(_0x8bdf,0xfe));var _0xf8bd=function(_0x31e29a,_0x349c9b){_0x31e29a=_0x31e29a-0x0;var _0x32d892=_0x8bdf[_0x31e29a];return _0x32d892;};'use strict';var info=require(_0xf8bd('0x0'));var exec=require('child_process')[_0xf8bd('0x1')];var logger=require('../../config/logger')(_0xf8bd('0x2'));var util=require('util');var BPromise=require(_0xf8bd('0x3'));var _=require(_0xf8bd('0x4'));function handleError(_0x53c26e,_0x1c5fb3,_0x4cdce3){_0x1c5fb3=_0x1c5fb3||0x1f4;return function(_0x376d3d){logger[_0xf8bd('0x5')](_0xf8bd('0x6'),_0x4cdce3,_0x1c5fb3,util[_0xf8bd('0x7')](_0x376d3d,{'showHidden':![],'depth':null}));delete _0x376d3d['name'];_0x53c26e[_0xf8bd('0x8')](_0x1c5fb3)[_0xf8bd('0x9')](_0x376d3d);};}exports['index']=function(_0x2a51ad,_0x523ded){return info[_0xf8bd('0xa')]()['then'](function(_0x268d97){return _0x523ded[_0xf8bd('0x8')](0xc8)[_0xf8bd('0xb')](_0x268d97);})[_0xf8bd('0xc')](function(_0x1091e2){return _0x523ded[_0xf8bd('0x8')](0x1f4)[_0xf8bd('0xb')](_0x1091e2);});};exports[_0xf8bd('0xd')]=function(_0x145055,_0x3bf294){var _0x5e0b02=[_0xf8bd('0xe')];return new BPromise(function(_0x25348f,_0x14d938){return exec(util[_0xf8bd('0xf')](_0xf8bd('0x10'),_0x145055[_0xf8bd('0x11')][_0xf8bd('0x12')]),function(_0x42861b,_0x33a7ad,_0x297fa7){if(_0x42861b){return _0x14d938(_0x42861b);}return _0x25348f(_0x33a7ad);});})['then'](function(_0x2e66fb){var _0x48c367=![];var _0x45e2d9=_0x2e66fb[_0xf8bd('0x13')](/\n/);for(var _0x393693=0x0,_0x36c3d8=_0x5e0b02[_0xf8bd('0x14')];_0x393693<_0x36c3d8,_0x48c367===![];_0x393693+=0x1){if(_0x2e66fb['indexOf'](_0x5e0b02[_0x393693])>=0x0){_0x48c367=!![];}}if(!_0x48c367){throw new Error(util[_0xf8bd('0xf')](_0xf8bd('0x15'),_0x145055[_0xf8bd('0x11')][_0xf8bd('0x12')]));}process[_0xf8bd('0x16')](_0x145055[_0xf8bd('0x11')]['pid'],_0xf8bd('0x17'));return _0x3bf294['status'](0xc8)[_0xf8bd('0xb')]({'message':util['format']('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x145055[_0xf8bd('0x11')][_0xf8bd('0x12')])});})[_0xf8bd('0xc')](handleError(_0x3bf294,null,_0xf8bd('0xd')));};
\ No newline at end of file
+var _0x8abe=['error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','status','send','index','getAllData','then','json','catch','killProcess','components/import/cm','format','params','pid','split','length','indexOf','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','exec','../../config/logger','util','bluebird','lodash'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x8abe,0x127));var _0xe8ab=function(_0x2dcf6e,_0x1e971f){_0x2dcf6e=_0x2dcf6e-0x0;var _0x5c9d78=_0x8abe[_0x2dcf6e];return _0x5c9d78;};'use strict';var info=require('systeminformation');var exec=require('child_process')[_0xe8ab('0x0')];var logger=require(_0xe8ab('0x1'))('api');var util=require(_0xe8ab('0x2'));var BPromise=require(_0xe8ab('0x3'));var _=require(_0xe8ab('0x4'));function handleError(_0x4ad03b,_0x629bdd,_0x314b4d){_0x629bdd=_0x629bdd||0x1f4;return function(_0x240d44){logger[_0xe8ab('0x5')](_0xe8ab('0x6'),_0x314b4d,_0x629bdd,util[_0xe8ab('0x7')](_0x240d44,{'showHidden':![],'depth':null}));delete _0x240d44['name'];_0x4ad03b[_0xe8ab('0x8')](_0x629bdd)[_0xe8ab('0x9')](_0x240d44);};}exports[_0xe8ab('0xa')]=function(_0x47cca1,_0x5b2c75){return info[_0xe8ab('0xb')]()[_0xe8ab('0xc')](function(_0x3590aa){return _0x5b2c75['status'](0xc8)[_0xe8ab('0xd')](_0x3590aa);})[_0xe8ab('0xe')](function(_0x20418d){return _0x5b2c75['status'](0x1f4)[_0xe8ab('0xd')](_0x20418d);});};exports[_0xe8ab('0xf')]=function(_0x369c1c,_0x907c8f){var _0x497c41=[_0xe8ab('0x10')];return new BPromise(function(_0xaedf01,_0x3d41ba){return exec(util[_0xe8ab('0x11')]('ps\x20-p\x20%s\x20-ww\x20-o\x20args',_0x369c1c[_0xe8ab('0x12')][_0xe8ab('0x13')]),function(_0x117b22,_0x233f4d,_0xf2e113){if(_0x117b22){return _0x3d41ba(_0x117b22);}return _0xaedf01(_0x233f4d);});})[_0xe8ab('0xc')](function(_0x112613){var _0x552bb5=![];var _0x5f4a61=_0x112613[_0xe8ab('0x14')](/\n/);for(var _0x593269=0x0,_0x17540c=_0x497c41[_0xe8ab('0x15')];_0x593269<_0x17540c,_0x552bb5===![];_0x593269+=0x1){if(_0x112613[_0xe8ab('0x16')](_0x497c41[_0x593269])>=0x0){_0x552bb5=!![];}}if(!_0x552bb5){throw new Error(util[_0xe8ab('0x11')]('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x369c1c[_0xe8ab('0x12')][_0xe8ab('0x13')]));}process['kill'](_0x369c1c['params'][_0xe8ab('0x13')],_0xe8ab('0x17'));return _0x907c8f[_0xe8ab('0x8')](0xc8)[_0xe8ab('0xd')]({'message':util[_0xe8ab('0x11')](_0xe8ab('0x18'),_0x369c1c['params'][_0xe8ab('0x13')])});})[_0xe8ab('0xe')](handleError(_0x907c8f,null,_0xe8ab('0xf')));};
\ No newline at end of file