Built motion from commit f651e4b0a7312c0adceb5e57d6684a801a3aaf0d. Version 3.0.0...
[motion-next.git] / server / api / system / system.controller.js
index f4f920f..a61d673 100644 (file)
@@ -1 +1 @@
-const a619_0x2517=['indexOf','Process\x20with\x20pid\x20%s\x20killed\x20correctly','getAllData','Process\x20with\x20pid\x20%s\x20not\x20found!','format','length','api','pid','kill','json','ps\x20-p\x20%s\x20-ww\x20-o\x20args','error','status','child_process','SIGINT','params','name','then','killProcess','catch','../../config/logger'];(function(_0x3affc7,_0x251776){const _0x3cc77e=function(_0x4a84ce){while(--_0x4a84ce){_0x3affc7['push'](_0x3affc7['shift']());}};_0x3cc77e(++_0x251776);}(a619_0x2517,0x79));const a619_0x3cc7=function(_0x3affc7,_0x251776){_0x3affc7=_0x3affc7-0x0;let _0x3cc77e=a619_0x2517[_0x3affc7];return _0x3cc77e;};const _0x5b4f8d=a619_0x3cc7;'use strict';const info=require('systeminformation'),exec=require(_0x5b4f8d('0x12'))['exec'],logger=require(_0x5b4f8d('0x4'))(_0x5b4f8d('0xb')),util=require('util');function handleError(_0x4a84ce,_0x330190,_0x1d2803){return _0x330190=_0x330190||0x1f4,function(_0x351bb5){const _0x762680=a619_0x3cc7;logger[_0x762680('0x10')]('<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s',_0x1d2803,_0x330190,util['inspect'](_0x351bb5,{'showHidden':![],'depth':null})),delete _0x351bb5[_0x762680('0x0')],_0x4a84ce[_0x762680('0x11')](_0x330190)['send'](_0x351bb5);};}exports['index']=function(_0x3c4cea,_0x551858){const _0x38687a=_0x5b4f8d;return info[_0x38687a('0x7')]()['then'](function(_0x7c18f7){const _0x262f13=_0x38687a;return _0x551858['status'](0xc8)[_0x262f13('0xe')](_0x7c18f7);})[_0x38687a('0x3')](function(_0x34a282){const _0x3b6cc7=_0x38687a;return _0x551858[_0x3b6cc7('0x11')](0x1f4)[_0x3b6cc7('0xe')](_0x34a282);});},exports[_0x5b4f8d('0x2')]=function(_0xe4f848,_0x589a76){const _0x2790e8=_0x5b4f8d,_0x3785e3=['components/import/cm'];return new Promise(function(_0x17b6f2,_0x3a1360){const _0x113ee=a619_0x3cc7;return exec(util[_0x113ee('0x9')](_0x113ee('0xf'),_0xe4f848['params']['pid']),function(_0xe8272e,_0x4b7f25){if(_0xe8272e)return _0x3a1360(_0xe8272e);return _0x17b6f2(_0x4b7f25);});})[_0x2790e8('0x1')](function(_0x1a08a9){const _0x1f12aa=_0x2790e8;let _0x9828e=![];for(let _0x55e054=0x0,_0x83bd8c=_0x3785e3[_0x1f12aa('0xa')];_0x55e054<_0x83bd8c,_0x9828e===![];_0x55e054+=0x1){_0x1a08a9[_0x1f12aa('0x5')](_0x3785e3[_0x55e054])>=0x0&&(_0x9828e=!![]);}if(!_0x9828e)throw new Error(util['format'](_0x1f12aa('0x8'),_0xe4f848[_0x1f12aa('0x14')]['pid']));return process[_0x1f12aa('0xd')](_0xe4f848[_0x1f12aa('0x14')][_0x1f12aa('0xc')],_0x1f12aa('0x13')),_0x589a76['status'](0xc8)['json']({'message':util[_0x1f12aa('0x9')](_0x1f12aa('0x6'),_0xe4f848[_0x1f12aa('0x14')]['pid'])});})['catch'](handleError(_0x589a76,null,_0x2790e8('0x2')));};
\ No newline at end of file
+const a619_0x1e39=['catch','name','params','getAllData','error','SIGINT','then','pid','api','../../config/logger','ps\x20-p\x20%s\x20-ww\x20-o\x20args','status','index','json','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','kill','Process\x20with\x20pid\x20%s\x20not\x20found!','send','components/import/cm','child_process','inspect','exec','format'];(function(_0x378d1d,_0x1e39b2){const _0xd03a6=function(_0x2cd669){while(--_0x2cd669){_0x378d1d['push'](_0x378d1d['shift']());}};_0xd03a6(++_0x1e39b2);}(a619_0x1e39,0x15e));const a619_0xd03a=function(_0x378d1d,_0x1e39b2){_0x378d1d=_0x378d1d-0x0;let _0xd03a6=a619_0x1e39[_0x378d1d];return _0xd03a6;};const _0x57a71f=a619_0xd03a;'use strict';const info=require('systeminformation'),exec=require(_0x57a71f('0xe'))[_0x57a71f('0x10')],logger=require(_0x57a71f('0x4'))(_0x57a71f('0x3')),util=require('util');function handleError(_0x2cd669,_0x2d3496,_0x5ed24e){return _0x2d3496=_0x2d3496||0x1f4,function(_0x24a250){const _0x4ba957=a619_0xd03a;logger[_0x4ba957('0x16')](_0x4ba957('0x9'),_0x5ed24e,_0x2d3496,util[_0x4ba957('0xf')](_0x24a250,{'showHidden':![],'depth':null})),delete _0x24a250[_0x4ba957('0x13')],_0x2cd669[_0x4ba957('0x6')](_0x2d3496)[_0x4ba957('0xc')](_0x24a250);};}exports[_0x57a71f('0x7')]=function(_0x4eb8dd,_0x163b88){const _0x54e5f4=_0x57a71f;return info[_0x54e5f4('0x15')]()['then'](function(_0x3c5165){const _0x32979a=_0x54e5f4;return _0x163b88[_0x32979a('0x6')](0xc8)[_0x32979a('0x8')](_0x3c5165);})[_0x54e5f4('0x12')](function(_0x2884d6){const _0x3e8c04=_0x54e5f4;return _0x163b88[_0x3e8c04('0x6')](0x1f4)[_0x3e8c04('0x8')](_0x2884d6);});},exports['killProcess']=function(_0x5cb18a,_0x9bfe9b){const _0x3f3a0d=_0x57a71f,_0x49d2cf=[_0x3f3a0d('0xd')];return new Promise(function(_0x5a0cc7,_0x1254bb){const _0x1cb4c8=_0x3f3a0d;return exec(util[_0x1cb4c8('0x11')](_0x1cb4c8('0x5'),_0x5cb18a[_0x1cb4c8('0x14')][_0x1cb4c8('0x2')]),function(_0x52765d,_0x54aab5){if(_0x52765d)return _0x1254bb(_0x52765d);return _0x5a0cc7(_0x54aab5);});})[_0x3f3a0d('0x1')](function(_0x26c586){const _0x1f6067=_0x3f3a0d;let _0xa18bd3=![];for(let _0x1d118f=0x0,_0x271351=_0x49d2cf['length'];_0x1d118f<_0x271351,_0xa18bd3===![];_0x1d118f+=0x1){_0x26c586['indexOf'](_0x49d2cf[_0x1d118f])>=0x0&&(_0xa18bd3=!![]);}if(!_0xa18bd3)throw new Error(util[_0x1f6067('0x11')](_0x1f6067('0xb'),_0x5cb18a[_0x1f6067('0x14')][_0x1f6067('0x2')]));return process[_0x1f6067('0xa')](_0x5cb18a[_0x1f6067('0x14')][_0x1f6067('0x2')],_0x1f6067('0x0')),_0x9bfe9b[_0x1f6067('0x6')](0xc8)[_0x1f6067('0x8')]({'message':util[_0x1f6067('0x11')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x5cb18a['params'][_0x1f6067('0x2')])});})[_0x3f3a0d('0x12')](handleError(_0x9bfe9b,null,'killProcess'));};
\ No newline at end of file