Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / api / system / system.controller.js
1 const a619_0x4829=['systeminformation','../../config/logger','status','killProcess','params','exec','components/import/cm','pid','error','Process\x20with\x20pid\x20%s\x20not\x20found!','Process\x20with\x20pid\x20%s\x20killed\x20correctly','util','SIGINT','json','child_process','name','send','format','indexOf','api','ps\x20-p\x20%s\x20-ww\x20-o\x20args','inspect','getAllData','then','catch','length','kill'];(function(_0x176a0e,_0x482984){const _0x4b533c=function(_0x375f3c){while(--_0x375f3c){_0x176a0e['push'](_0x176a0e['shift']());}};_0x4b533c(++_0x482984);}(a619_0x4829,0x158));const a619_0x4b53=function(_0x176a0e,_0x482984){_0x176a0e=_0x176a0e-0x0;let _0x4b533c=a619_0x4829[_0x176a0e];return _0x4b533c;};const _0x10ba0d=a619_0x4b53;'use strict';const info=require(_0x10ba0d('0x7')),exec=require(_0x10ba0d('0x15'))[_0x10ba0d('0xc')],logger=require(_0x10ba0d('0x8'))(_0x10ba0d('0x1a')),util=require(_0x10ba0d('0x12'));function handleError(_0x375f3c,_0x1a848b,_0x2224e0){return _0x1a848b=_0x1a848b||0x1f4,function(_0x21fdbc){const _0x34663d=a619_0x4b53;logger[_0x34663d('0xf')]('<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s',_0x2224e0,_0x1a848b,util[_0x34663d('0x1')](_0x21fdbc,{'showHidden':![],'depth':null})),delete _0x21fdbc[_0x34663d('0x16')],_0x375f3c[_0x34663d('0x9')](_0x1a848b)[_0x34663d('0x17')](_0x21fdbc);};}exports['index']=function(_0x49eaa1,_0x2551ff){const _0x4cd7d6=_0x10ba0d;return info[_0x4cd7d6('0x2')]()[_0x4cd7d6('0x3')](function(_0x1eea31){const _0x159c3c=_0x4cd7d6;return _0x2551ff[_0x159c3c('0x9')](0xc8)[_0x159c3c('0x14')](_0x1eea31);})[_0x4cd7d6('0x4')](function(_0x123787){const _0x142a7f=_0x4cd7d6;return _0x2551ff['status'](0x1f4)[_0x142a7f('0x14')](_0x123787);});},exports[_0x10ba0d('0xa')]=function(_0x5b8177,_0x145287){const _0x32754a=_0x10ba0d,_0x129080=[_0x32754a('0xd')];return new Promise(function(_0x497a39,_0x1bfe6b){const _0x2a669a=_0x32754a;return exec(util[_0x2a669a('0x18')](_0x2a669a('0x0'),_0x5b8177[_0x2a669a('0xb')][_0x2a669a('0xe')]),function(_0x2fc7fa,_0x53d26b){if(_0x2fc7fa)return _0x1bfe6b(_0x2fc7fa);return _0x497a39(_0x53d26b);});})[_0x32754a('0x3')](function(_0x578314){const _0x2cbb4a=_0x32754a;let _0x4094e0=![];for(let _0x55ac46=0x0,_0x375585=_0x129080[_0x2cbb4a('0x5')];_0x55ac46<_0x375585,_0x4094e0===![];_0x55ac46+=0x1){_0x578314[_0x2cbb4a('0x19')](_0x129080[_0x55ac46])>=0x0&&(_0x4094e0=!![]);}if(!_0x4094e0)throw new Error(util['format'](_0x2cbb4a('0x10'),_0x5b8177[_0x2cbb4a('0xb')][_0x2cbb4a('0xe')]));return process[_0x2cbb4a('0x6')](_0x5b8177[_0x2cbb4a('0xb')][_0x2cbb4a('0xe')],_0x2cbb4a('0x13')),_0x145287['status'](0xc8)[_0x2cbb4a('0x14')]({'message':util[_0x2cbb4a('0x18')](_0x2cbb4a('0x11'),_0x5b8177[_0x2cbb4a('0xb')][_0x2cbb4a('0xe')])});})[_0x32754a('0x4')](handleError(_0x145287,null,_0x32754a('0xa')));};