Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / system / system.controller.js
index 5b9ea0e..cfc0f7b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x86e2=['exec','../../config/logger','api','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','status','send','index','getAllData','catch','json','killProcess','components/import/cm','params','pid','then','length','indexOf','format','Process\x20with\x20pid\x20%s\x20not\x20found!','kill','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','child_process'];(function(_0x2bd007,_0x281ba0){var _0x53c252=function(_0x35844b){while(--_0x35844b){_0x2bd007['push'](_0x2bd007['shift']());}};_0x53c252(++_0x281ba0);}(_0x86e2,0xb5));var _0x286e=function(_0x218033,_0x381180){_0x218033=_0x218033-0x0;var _0x232b2a=_0x86e2[_0x218033];return _0x232b2a;};'use strict';var info=require('systeminformation');var exec=require(_0x286e('0x0'))[_0x286e('0x1')];var logger=require(_0x286e('0x2'))(_0x286e('0x3'));var util=require('util');var BPromise=require('bluebird');var _=require('lodash');function handleError(_0x70bc,_0x605485,_0x181ece){_0x605485=_0x605485||0x1f4;return function(_0x42849c){logger[_0x286e('0x4')](_0x286e('0x5'),_0x181ece,_0x605485,util[_0x286e('0x6')](_0x42849c,{'showHidden':![],'depth':null}));delete _0x42849c[_0x286e('0x7')];_0x70bc[_0x286e('0x8')](_0x605485)[_0x286e('0x9')](_0x42849c);};}exports[_0x286e('0xa')]=function(_0x488b8f,_0x264e3a){return info[_0x286e('0xb')]()['then'](function(_0x5c36fb){return _0x264e3a[_0x286e('0x8')](0xc8)['json'](_0x5c36fb);})[_0x286e('0xc')](function(_0x34c301){return _0x264e3a[_0x286e('0x8')](0x1f4)[_0x286e('0xd')](_0x34c301);});};exports[_0x286e('0xe')]=function(_0x6b64d2,_0x3fe0bf){var _0x382358=[_0x286e('0xf')];return new BPromise(function(_0x2a5bf1,_0x2a915b){return exec(util['format']('ps\x20-p\x20%s\x20-ww\x20-o\x20args',_0x6b64d2[_0x286e('0x10')][_0x286e('0x11')]),function(_0x4fc176,_0x570067,_0x634665){if(_0x4fc176){return _0x2a915b(_0x4fc176);}return _0x2a5bf1(_0x570067);});})[_0x286e('0x12')](function(_0x38fc43){var _0x569e97=![];var _0x131be7=_0x38fc43['split'](/\n/);for(var _0x4065c0=0x0,_0x5f56eb=_0x382358[_0x286e('0x13')];_0x4065c0<_0x5f56eb,_0x569e97===![];_0x4065c0+=0x1){if(_0x38fc43[_0x286e('0x14')](_0x382358[_0x4065c0])>=0x0){_0x569e97=!![];}}if(!_0x569e97){throw new Error(util[_0x286e('0x15')](_0x286e('0x16'),_0x6b64d2['params'][_0x286e('0x11')]));}process[_0x286e('0x17')](_0x6b64d2[_0x286e('0x10')][_0x286e('0x11')],_0x286e('0x18'));return _0x3fe0bf[_0x286e('0x8')](0xc8)[_0x286e('0xd')]({'message':util[_0x286e('0x15')](_0x286e('0x19'),_0x6b64d2[_0x286e('0x10')][_0x286e('0x11')])});})[_0x286e('0xc')](handleError(_0x3fe0bf,null,_0x286e('0xe')));};
\ No newline at end of file
+var _0x90ff=['Process\x20with\x20pid\x20%s\x20killed\x20correctly','systeminformation','child_process','exec','api','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','name','status','send','then','json','catch','killProcess','components/import/cm','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','split','length','indexOf','format','Process\x20with\x20pid\x20%s\x20not\x20found!','kill','SIGINT'];(function(_0x28beb1,_0x29c4fb){var _0x3b560f=function(_0x3afd21){while(--_0x3afd21){_0x28beb1['push'](_0x28beb1['shift']());}};_0x3b560f(++_0x29c4fb);}(_0x90ff,0xa3));var _0xf90f=function(_0x3f1e44,_0x4c00ad){_0x3f1e44=_0x3f1e44-0x0;var _0x20b6a5=_0x90ff[_0x3f1e44];return _0x20b6a5;};'use strict';var info=require(_0xf90f('0x0'));var exec=require(_0xf90f('0x1'))[_0xf90f('0x2')];var logger=require('../../config/logger')(_0xf90f('0x3'));var util=require('util');var BPromise=require(_0xf90f('0x4'));var _=require(_0xf90f('0x5'));function handleError(_0x583ef4,_0x52afa7,_0x3f6f74){_0x52afa7=_0x52afa7||0x1f4;return function(_0x301b5f){logger[_0xf90f('0x6')](_0xf90f('0x7'),_0x3f6f74,_0x52afa7,util['inspect'](_0x301b5f,{'showHidden':![],'depth':null}));delete _0x301b5f[_0xf90f('0x8')];_0x583ef4[_0xf90f('0x9')](_0x52afa7)[_0xf90f('0xa')](_0x301b5f);};}exports['index']=function(_0x12c618,_0x212522){return info['getAllData']()[_0xf90f('0xb')](function(_0x4fe725){return _0x212522[_0xf90f('0x9')](0xc8)[_0xf90f('0xc')](_0x4fe725);})[_0xf90f('0xd')](function(_0x1acdf3){return _0x212522[_0xf90f('0x9')](0x1f4)['json'](_0x1acdf3);});};exports[_0xf90f('0xe')]=function(_0x190921,_0x305ba9){var _0x4b397a=[_0xf90f('0xf')];return new BPromise(function(_0x19720f,_0x2a2213){return exec(util['format'](_0xf90f('0x10'),_0x190921[_0xf90f('0x11')][_0xf90f('0x12')]),function(_0x112cf9,_0x24d28c,_0x5ad2f0){if(_0x112cf9){return _0x2a2213(_0x112cf9);}return _0x19720f(_0x24d28c);});})[_0xf90f('0xb')](function(_0x181167){var _0x2fb3c7=![];var _0x1f76f9=_0x181167[_0xf90f('0x13')](/\n/);for(var _0x340ee2=0x0,_0x59fbf4=_0x4b397a[_0xf90f('0x14')];_0x340ee2<_0x59fbf4,_0x2fb3c7===![];_0x340ee2+=0x1){if(_0x181167[_0xf90f('0x15')](_0x4b397a[_0x340ee2])>=0x0){_0x2fb3c7=!![];}}if(!_0x2fb3c7){throw new Error(util[_0xf90f('0x16')](_0xf90f('0x17'),_0x190921['params']['pid']));}process[_0xf90f('0x18')](_0x190921[_0xf90f('0x11')][_0xf90f('0x12')],_0xf90f('0x19'));return _0x305ba9['status'](0xc8)[_0xf90f('0xc')]({'message':util['format'](_0xf90f('0x1a'),_0x190921[_0xf90f('0x11')][_0xf90f('0x12')])});})[_0xf90f('0xd')](handleError(_0x305ba9,null,'killProcess'));};
\ No newline at end of file