Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / api / system / system.controller.js
index a15de20..a9436b1 100644 (file)
@@ -1 +1 @@
-const a619_0x3726=['systeminformation','format','status','catch','json','send','../../config/logger','pid','killProcess','index','params','inspect','util','then','name','ps\x20-p\x20%s\x20-ww\x20-o\x20args','api'];(function(_0x4cdd4c,_0x3726b4){const _0x231979=function(_0x89388d){while(--_0x89388d){_0x4cdd4c['push'](_0x4cdd4c['shift']());}};_0x231979(++_0x3726b4);}(a619_0x3726,0x137));const a619_0x2319=function(_0x4cdd4c,_0x3726b4){_0x4cdd4c=_0x4cdd4c-0x0;let _0x231979=a619_0x3726[_0x4cdd4c];return _0x231979;};const _0x13eaaa=a619_0x2319;'use strict';const info=require(_0x13eaaa('0xc')),exec=require('child_process')['exec'],logger=require(_0x13eaaa('0x1'))(_0x13eaaa('0xb')),util=require(_0x13eaaa('0x7'));function handleError(_0x89388d,_0x119764,_0x46887d){return _0x119764=_0x119764||0x1f4,function(_0x4bceb8){const _0x5d09a5=a619_0x2319;logger['error']('<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s',_0x46887d,_0x119764,util[_0x5d09a5('0x6')](_0x4bceb8,{'showHidden':![],'depth':null})),delete _0x4bceb8[_0x5d09a5('0x9')],_0x89388d[_0x5d09a5('0xe')](_0x119764)[_0x5d09a5('0x0')](_0x4bceb8);};}exports[_0x13eaaa('0x4')]=function(_0x234c68,_0x36edc4){const _0x4edc6f=_0x13eaaa;return info['getAllData']()[_0x4edc6f('0x8')](function(_0x6aa35e){const _0x59c1f9=_0x4edc6f;return _0x36edc4[_0x59c1f9('0xe')](0xc8)[_0x59c1f9('0x10')](_0x6aa35e);})[_0x4edc6f('0xf')](function(_0x57ca13){return _0x36edc4['status'](0x1f4)['json'](_0x57ca13);});},exports['killProcess']=function(_0x15c5c9,_0xdc9a59){const _0x5a9dca=_0x13eaaa,_0x17544b=['components/import/cm'];return new Promise(function(_0x3860be,_0x286f1a){const _0x5cfc3d=a619_0x2319;return exec(util[_0x5cfc3d('0xd')](_0x5cfc3d('0xa'),_0x15c5c9[_0x5cfc3d('0x5')][_0x5cfc3d('0x2')]),function(_0x248fbf,_0x427dff){if(_0x248fbf)return _0x286f1a(_0x248fbf);return _0x3860be(_0x427dff);});})[_0x5a9dca('0x8')](function(_0x5ab3f2){const _0x7b856a=_0x5a9dca;let _0x194f58=![];for(let _0x261f51=0x0,_0x3535f8=_0x17544b['length'];_0x261f51<_0x3535f8,_0x194f58===![];_0x261f51+=0x1){_0x5ab3f2['indexOf'](_0x17544b[_0x261f51])>=0x0&&(_0x194f58=!![]);}if(!_0x194f58)throw new Error(util[_0x7b856a('0xd')]('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x15c5c9[_0x7b856a('0x5')][_0x7b856a('0x2')]));return process['kill'](_0x15c5c9[_0x7b856a('0x5')][_0x7b856a('0x2')],'SIGINT'),_0xdc9a59['status'](0xc8)[_0x7b856a('0x10')]({'message':util[_0x7b856a('0xd')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x15c5c9['params']['pid'])});})[_0x5a9dca('0xf')](handleError(_0xdc9a59,null,_0x5a9dca('0x3')));};
\ No newline at end of file
+const a619_0x2a2e=['status','SIGINT','json','error','name','Process\x20with\x20pid\x20%s\x20killed\x20correctly','components/import/cm','util','killProcess','format','send','catch','../../config/logger','length','kill','index','child_process','inspect','exec','then','pid','Process\x20with\x20pid\x20%s\x20not\x20found!','params','ps\x20-p\x20%s\x20-ww\x20-o\x20args','getAllData','indexOf','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s'];(function(_0x59b3a0,_0x2a2ec5){const _0x38d875=function(_0x3e7edf){while(--_0x3e7edf){_0x59b3a0['push'](_0x59b3a0['shift']());}};_0x38d875(++_0x2a2ec5);}(a619_0x2a2e,0xac));const a619_0x38d8=function(_0x59b3a0,_0x2a2ec5){_0x59b3a0=_0x59b3a0-0x0;let _0x38d875=a619_0x2a2e[_0x59b3a0];return _0x38d875;};const _0x271830=a619_0x38d8;'use strict';const info=require('systeminformation'),exec=require(_0x271830('0x6'))[_0x271830('0x8')],logger=require(_0x271830('0x2'))('api'),util=require(_0x271830('0x18'));function handleError(_0x3e7edf,_0x1cbe1a,_0x20ff6f){return _0x1cbe1a=_0x1cbe1a||0x1f4,function(_0x4f105e){const _0x46fb91=a619_0x38d8;logger[_0x46fb91('0x14')](_0x46fb91('0x10'),_0x20ff6f,_0x1cbe1a,util[_0x46fb91('0x7')](_0x4f105e,{'showHidden':![],'depth':null})),delete _0x4f105e[_0x46fb91('0x15')],_0x3e7edf['status'](_0x1cbe1a)[_0x46fb91('0x0')](_0x4f105e);};}exports[_0x271830('0x5')]=function(_0x295074,_0x5985e2){const _0x58b2e0=_0x271830;return info[_0x58b2e0('0xe')]()[_0x58b2e0('0x9')](function(_0x55dff6){const _0x59a633=_0x58b2e0;return _0x5985e2['status'](0xc8)[_0x59a633('0x13')](_0x55dff6);})['catch'](function(_0x1d75a8){const _0x4ed042=_0x58b2e0;return _0x5985e2['status'](0x1f4)[_0x4ed042('0x13')](_0x1d75a8);});},exports[_0x271830('0x19')]=function(_0x12c332,_0x4cbad){const _0x382429=_0x271830,_0x5975fa=[_0x382429('0x17')];return new Promise(function(_0x27b80d,_0x4a4fca){const _0x3f94a5=_0x382429;return exec(util[_0x3f94a5('0x1a')](_0x3f94a5('0xd'),_0x12c332[_0x3f94a5('0xc')][_0x3f94a5('0xa')]),function(_0x2fcd0d,_0x1ccd66){if(_0x2fcd0d)return _0x4a4fca(_0x2fcd0d);return _0x27b80d(_0x1ccd66);});})[_0x382429('0x9')](function(_0x53909e){const _0x3e0a91=_0x382429;let _0x183f84=![];for(let _0x15af96=0x0,_0x519189=_0x5975fa[_0x3e0a91('0x3')];_0x15af96<_0x519189,_0x183f84===![];_0x15af96+=0x1){_0x53909e[_0x3e0a91('0xf')](_0x5975fa[_0x15af96])>=0x0&&(_0x183f84=!![]);}if(!_0x183f84)throw new Error(util['format'](_0x3e0a91('0xb'),_0x12c332[_0x3e0a91('0xc')][_0x3e0a91('0xa')]));return process[_0x3e0a91('0x4')](_0x12c332[_0x3e0a91('0xc')]['pid'],_0x3e0a91('0x12')),_0x4cbad[_0x3e0a91('0x11')](0xc8)['json']({'message':util[_0x3e0a91('0x1a')](_0x3e0a91('0x16'),_0x12c332['params'][_0x3e0a91('0xa')])});})[_0x382429('0x1')](handleError(_0x4cbad,null,'killProcess'));};
\ No newline at end of file