Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / system / system.controller.js
index fdb1b73..a22c25f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9a8d=['Process\x20with\x20pid\x20%s\x20killed\x20correctly','killProcess','systeminformation','child_process','exec','../../config/logger','api','util','bluebird','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','send','getAllData','then','status','catch','json','components/import/cm','pid','split','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','params','kill','SIGINT'];(function(_0x565fed,_0xb85768){var _0x3e018f=function(_0x104d8e){while(--_0x104d8e){_0x565fed['push'](_0x565fed['shift']());}};_0x3e018f(++_0xb85768);}(_0x9a8d,0xec));var _0xd9a8=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9a8d[_0x3dd15e];return _0x231fd0;};'use strict';var info=require(_0xd9a8('0x0'));var exec=require(_0xd9a8('0x1'))[_0xd9a8('0x2')];var logger=require(_0xd9a8('0x3'))(_0xd9a8('0x4'));var util=require(_0xd9a8('0x5'));var BPromise=require(_0xd9a8('0x6'));var _=require('lodash');function handleError(_0x277eaf,_0x2c26ac,_0x2191a1){_0x2c26ac=_0x2c26ac||0x1f4;return function(_0x2e95eb){logger['error'](_0xd9a8('0x7'),_0x2191a1,_0x2c26ac,util[_0xd9a8('0x8')](_0x2e95eb,{'showHidden':![],'depth':null}));delete _0x2e95eb[_0xd9a8('0x9')];_0x277eaf['status'](_0x2c26ac)[_0xd9a8('0xa')](_0x2e95eb);};}exports['index']=function(_0x3ddaf0,_0x3c1621){return info[_0xd9a8('0xb')]()[_0xd9a8('0xc')](function(_0x47f2ec){return _0x3c1621[_0xd9a8('0xd')](0xc8)['json'](_0x47f2ec);})[_0xd9a8('0xe')](function(_0x50a7fe){return _0x3c1621[_0xd9a8('0xd')](0x1f4)[_0xd9a8('0xf')](_0x50a7fe);});};exports['killProcess']=function(_0xfce41b,_0x3486df){var _0x296111=[_0xd9a8('0x10')];return new BPromise(function(_0x51eb8e,_0x5b68fa){return exec(util['format']('ps\x20-p\x20%s\x20-ww\x20-o\x20args',_0xfce41b['params'][_0xd9a8('0x11')]),function(_0x2ff5e9,_0xf4f944,_0x545889){if(_0x2ff5e9){return _0x5b68fa(_0x2ff5e9);}return _0x51eb8e(_0xf4f944);});})[_0xd9a8('0xc')](function(_0x1d0c21){var _0x5ee7e7=![];var _0x53c09d=_0x1d0c21[_0xd9a8('0x12')](/\n/);for(var _0x331e00=0x0,_0x24ce9b=_0x296111['length'];_0x331e00<_0x24ce9b,_0x5ee7e7===![];_0x331e00+=0x1){if(_0x1d0c21[_0xd9a8('0x13')](_0x296111[_0x331e00])>=0x0){_0x5ee7e7=!![];}}if(!_0x5ee7e7){throw new Error(util['format'](_0xd9a8('0x14'),_0xfce41b[_0xd9a8('0x15')][_0xd9a8('0x11')]));}process[_0xd9a8('0x16')](_0xfce41b['params']['pid'],_0xd9a8('0x17'));return _0x3486df[_0xd9a8('0xd')](0xc8)[_0xd9a8('0xf')]({'message':util['format'](_0xd9a8('0x18'),_0xfce41b['params']['pid'])});})['catch'](handleError(_0x3486df,null,_0xd9a8('0x19')));};
\ No newline at end of file
+var _0x909f=['format','pid','then','length','indexOf','params','SIGINT','killProcess','systeminformation','exec','../../config/logger','api','bluebird','lodash','error','inspect','send','index','getAllData','status','json','catch','components/import/cm'];(function(_0x3357b1,_0x382094){var _0x1ba859=function(_0x3e8b38){while(--_0x3e8b38){_0x3357b1['push'](_0x3357b1['shift']());}};_0x1ba859(++_0x382094);}(_0x909f,0x1eb));var _0xf909=function(_0x3ea20c,_0x4d39e8){_0x3ea20c=_0x3ea20c-0x0;var _0x1d39b5=_0x909f[_0x3ea20c];return _0x1d39b5;};'use strict';var info=require(_0xf909('0x0'));var exec=require('child_process')[_0xf909('0x1')];var logger=require(_0xf909('0x2'))(_0xf909('0x3'));var util=require('util');var BPromise=require(_0xf909('0x4'));var _=require(_0xf909('0x5'));function handleError(_0x48fc74,_0xb79fb6,_0x43623d){_0xb79fb6=_0xb79fb6||0x1f4;return function(_0x16a484){logger[_0xf909('0x6')]('<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s',_0x43623d,_0xb79fb6,util[_0xf909('0x7')](_0x16a484,{'showHidden':![],'depth':null}));delete _0x16a484['name'];_0x48fc74['status'](_0xb79fb6)[_0xf909('0x8')](_0x16a484);};}exports[_0xf909('0x9')]=function(_0x1eafd0,_0xb35584){return info[_0xf909('0xa')]()['then'](function(_0x3ee2e4){return _0xb35584[_0xf909('0xb')](0xc8)[_0xf909('0xc')](_0x3ee2e4);})[_0xf909('0xd')](function(_0x20ba4a){return _0xb35584[_0xf909('0xb')](0x1f4)[_0xf909('0xc')](_0x20ba4a);});};exports['killProcess']=function(_0x1e9270,_0x3dbdd4){var _0x221c70=[_0xf909('0xe')];return new BPromise(function(_0x4dfc15,_0x4234c1){return exec(util[_0xf909('0xf')]('ps\x20-p\x20%s\x20-ww\x20-o\x20args',_0x1e9270['params'][_0xf909('0x10')]),function(_0x6a140d,_0x2abbff,_0x7597bd){if(_0x6a140d){return _0x4234c1(_0x6a140d);}return _0x4dfc15(_0x2abbff);});})[_0xf909('0x11')](function(_0x35f410){var _0x12f096=![];var _0x588500=_0x35f410['split'](/\n/);for(var _0x5435f5=0x0,_0x5d8d40=_0x221c70[_0xf909('0x12')];_0x5435f5<_0x5d8d40,_0x12f096===![];_0x5435f5+=0x1){if(_0x35f410[_0xf909('0x13')](_0x221c70[_0x5435f5])>=0x0){_0x12f096=!![];}}if(!_0x12f096){throw new Error(util['format']('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x1e9270[_0xf909('0x14')][_0xf909('0x10')]));}process['kill'](_0x1e9270['params'][_0xf909('0x10')],_0xf909('0x15'));return _0x3dbdd4['status'](0xc8)[_0xf909('0xc')]({'message':util[_0xf909('0xf')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x1e9270['params']['pid'])});})['catch'](handleError(_0x3dbdd4,null,_0xf909('0x16')));};
\ No newline at end of file