Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / api / system / system.controller.js
index f7250af..ce685a6 100644 (file)
@@ -1 +1 @@
-const a619_0x3035=['format','indexOf','Process\x20with\x20pid\x20%s\x20killed\x20correctly','inspect','index','exec','SIGINT','child_process','params','killProcess','api','error','then','ps\x20-p\x20%s\x20-ww\x20-o\x20args','Process\x20with\x20pid\x20%s\x20not\x20found!','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','pid','length','send','util','systeminformation','catch','json'];(function(_0x51f1bc,_0x303563){const _0x5b397b=function(_0x177e91){while(--_0x177e91){_0x51f1bc['push'](_0x51f1bc['shift']());}};_0x5b397b(++_0x303563);}(a619_0x3035,0xbd));const a619_0x5b39=function(_0x51f1bc,_0x303563){_0x51f1bc=_0x51f1bc-0x0;let _0x5b397b=a619_0x3035[_0x51f1bc];return _0x5b397b;};const _0x350633=a619_0x5b39;'use strict';const info=require(_0x350633('0xf')),exec=require(_0x350633('0x2'))[_0x350633('0x0')],logger=require('../../config/logger')(_0x350633('0x5')),util=require(_0x350633('0xe'));function handleError(_0x177e91,_0x4526fd,_0x4a1e27){return _0x4526fd=_0x4526fd||0x1f4,function(_0x5d2ed5){const _0x2b8050=a619_0x5b39;logger[_0x2b8050('0x6')](_0x2b8050('0xa'),_0x4a1e27,_0x4526fd,util[_0x2b8050('0x15')](_0x5d2ed5,{'showHidden':![],'depth':null})),delete _0x5d2ed5['name'],_0x177e91['status'](_0x4526fd)[_0x2b8050('0xd')](_0x5d2ed5);};}exports[_0x350633('0x16')]=function(_0x15dab7,_0x2b73e9){const _0x16385a=_0x350633;return info['getAllData']()[_0x16385a('0x7')](function(_0x9e873d){const _0x52008f=_0x16385a;return _0x2b73e9['status'](0xc8)[_0x52008f('0x11')](_0x9e873d);})[_0x16385a('0x10')](function(_0x29d33e){const _0x333f6a=_0x16385a;return _0x2b73e9['status'](0x1f4)[_0x333f6a('0x11')](_0x29d33e);});},exports[_0x350633('0x4')]=function(_0x3c858d,_0x199ce4){const _0x452d48=_0x350633,_0x48b580=['components/import/cm'];return new Promise(function(_0x1b3fd0,_0xb39d60){const _0x310f63=a619_0x5b39;return exec(util[_0x310f63('0x12')](_0x310f63('0x8'),_0x3c858d['params'][_0x310f63('0xb')]),function(_0x278e26,_0x4447ad){if(_0x278e26)return _0xb39d60(_0x278e26);return _0x1b3fd0(_0x4447ad);});})[_0x452d48('0x7')](function(_0xf9ab07){const _0x2a66b5=_0x452d48;let _0x25f035=![];for(let _0x7eb402=0x0,_0x5276d3=_0x48b580[_0x2a66b5('0xc')];_0x7eb402<_0x5276d3,_0x25f035===![];_0x7eb402+=0x1){_0xf9ab07[_0x2a66b5('0x13')](_0x48b580[_0x7eb402])>=0x0&&(_0x25f035=!![]);}if(!_0x25f035)throw new Error(util[_0x2a66b5('0x12')](_0x2a66b5('0x9'),_0x3c858d['params'][_0x2a66b5('0xb')]));return process['kill'](_0x3c858d[_0x2a66b5('0x3')][_0x2a66b5('0xb')],_0x2a66b5('0x1')),_0x199ce4['status'](0xc8)[_0x2a66b5('0x11')]({'message':util[_0x2a66b5('0x12')](_0x2a66b5('0x14'),_0x3c858d['params']['pid'])});})['catch'](handleError(_0x199ce4,null,_0x452d48('0x4')));};
\ No newline at end of file
+const a619_0x2a37=['name','Process\x20with\x20pid\x20%s\x20not\x20found!','params','send','length','getAllData','SIGINT','format','indexOf','status','util','systeminformation','pid','killProcess','then','components/import/cm','catch','exec','ps\x20-p\x20%s\x20-ww\x20-o\x20args','error','child_process','api','json'];(function(_0x2ead96,_0x2a37f9){const _0x3023af=function(_0x40fc86){while(--_0x40fc86){_0x2ead96['push'](_0x2ead96['shift']());}};_0x3023af(++_0x2a37f9);}(a619_0x2a37,0x98));const a619_0x3023=function(_0x2ead96,_0x2a37f9){_0x2ead96=_0x2ead96-0x0;let _0x3023af=a619_0x2a37[_0x2ead96];return _0x3023af;};const _0x11959b=a619_0x3023;'use strict';const info=require(_0x11959b('0x14')),exec=require(_0x11959b('0x6'))[_0x11959b('0x3')],logger=require('../../config/logger')(_0x11959b('0x7')),util=require(_0x11959b('0x13'));function handleError(_0x40fc86,_0x13f2d9,_0x444134){return _0x13f2d9=_0x13f2d9||0x1f4,function(_0xcacaaa){const _0x3f0fa5=a619_0x3023;logger[_0x3f0fa5('0x5')]('<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s',_0x444134,_0x13f2d9,util['inspect'](_0xcacaaa,{'showHidden':![],'depth':null})),delete _0xcacaaa[_0x3f0fa5('0x9')],_0x40fc86['status'](_0x13f2d9)[_0x3f0fa5('0xc')](_0xcacaaa);};}exports['index']=function(_0x329599,_0x23f8f8){const _0x1bd597=_0x11959b;return info[_0x1bd597('0xe')]()[_0x1bd597('0x0')](function(_0x61d297){const _0x1e03b1=_0x1bd597;return _0x23f8f8[_0x1e03b1('0x12')](0xc8)[_0x1e03b1('0x8')](_0x61d297);})['catch'](function(_0x40d97a){const _0x47f4c1=_0x1bd597;return _0x23f8f8[_0x47f4c1('0x12')](0x1f4)[_0x47f4c1('0x8')](_0x40d97a);});},exports['killProcess']=function(_0x368e79,_0x2d95c6){const _0x3ddcb9=_0x11959b,_0x1a6c43=[_0x3ddcb9('0x1')];return new Promise(function(_0x1ac21c,_0x3f3cf7){const _0x470a99=_0x3ddcb9;return exec(util[_0x470a99('0x10')](_0x470a99('0x4'),_0x368e79['params'][_0x470a99('0x15')]),function(_0x3fc440,_0x1cd6aa){if(_0x3fc440)return _0x3f3cf7(_0x3fc440);return _0x1ac21c(_0x1cd6aa);});})[_0x3ddcb9('0x0')](function(_0x25c10b){const _0x14c218=_0x3ddcb9;let _0x59ee0e=![];for(let _0x4b3071=0x0,_0x1627cd=_0x1a6c43[_0x14c218('0xd')];_0x4b3071<_0x1627cd,_0x59ee0e===![];_0x4b3071+=0x1){_0x25c10b[_0x14c218('0x11')](_0x1a6c43[_0x4b3071])>=0x0&&(_0x59ee0e=!![]);}if(!_0x59ee0e)throw new Error(util['format'](_0x14c218('0xa'),_0x368e79[_0x14c218('0xb')]['pid']));return process['kill'](_0x368e79['params']['pid'],_0x14c218('0xf')),_0x2d95c6['status'](0xc8)[_0x14c218('0x8')]({'message':util[_0x14c218('0x10')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x368e79[_0x14c218('0xb')][_0x14c218('0x15')])});})[_0x3ddcb9('0x2')](handleError(_0x2d95c6,null,_0x3ddcb9('0x16')));};
\ No newline at end of file