Built motion from commit a8c4dd89.|2.6.33
[motion2.git] / server / api / system / system.controller.js
index 8fcb168..f8f1fe7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd4a8=['json','catch','killProcess','components/import/cm','params','pid','split','length','indexOf','format','kill','systeminformation','child_process','exec','../../config/logger','api','util','bluebird','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','name','status','send','index','getAllData','then'];(function(_0x5d107c,_0x1f204d){var _0x53bd5a=function(_0x451b17){while(--_0x451b17){_0x5d107c['push'](_0x5d107c['shift']());}};_0x53bd5a(++_0x1f204d);}(_0xd4a8,0x8d));var _0x8d4a=function(_0xc9bc0f,_0x12e2ac){_0xc9bc0f=_0xc9bc0f-0x0;var _0x4aacbc=_0xd4a8[_0xc9bc0f];return _0x4aacbc;};'use strict';var info=require(_0x8d4a('0x0'));var exec=require(_0x8d4a('0x1'))[_0x8d4a('0x2')];var logger=require(_0x8d4a('0x3'))(_0x8d4a('0x4'));var util=require(_0x8d4a('0x5'));var BPromise=require(_0x8d4a('0x6'));var _=require('lodash');function handleError(_0x1a3db2,_0x130209,_0x472c6a){_0x130209=_0x130209||0x1f4;return function(_0x32520a){logger[_0x8d4a('0x7')](_0x8d4a('0x8'),_0x472c6a,_0x130209,util['inspect'](_0x32520a,{'showHidden':![],'depth':null}));delete _0x32520a[_0x8d4a('0x9')];_0x1a3db2[_0x8d4a('0xa')](_0x130209)[_0x8d4a('0xb')](_0x32520a);};}exports[_0x8d4a('0xc')]=function(_0x1a40e0,_0x13c342){return info[_0x8d4a('0xd')]()[_0x8d4a('0xe')](function(_0x5602c2){return _0x13c342['status'](0xc8)[_0x8d4a('0xf')](_0x5602c2);})[_0x8d4a('0x10')](function(_0x1eff97){return _0x13c342[_0x8d4a('0xa')](0x1f4)['json'](_0x1eff97);});};exports[_0x8d4a('0x11')]=function(_0xf75981,_0x3c1a5b){var _0x5272a2=[_0x8d4a('0x12')];return new BPromise(function(_0x5ef72b,_0x2348b6){return exec(util['format']('ps\x20-p\x20%s\x20-ww\x20-o\x20args',_0xf75981[_0x8d4a('0x13')][_0x8d4a('0x14')]),function(_0xbe019f,_0x1cfeb2,_0x36120c){if(_0xbe019f){return _0x2348b6(_0xbe019f);}return _0x5ef72b(_0x1cfeb2);});})[_0x8d4a('0xe')](function(_0x299832){var _0x33334e=![];var _0x4bc115=_0x299832[_0x8d4a('0x15')](/\n/);for(var _0x422c6e=0x0,_0x1f5972=_0x5272a2[_0x8d4a('0x16')];_0x422c6e<_0x1f5972,_0x33334e===![];_0x422c6e+=0x1){if(_0x299832[_0x8d4a('0x17')](_0x5272a2[_0x422c6e])>=0x0){_0x33334e=!![];}}if(!_0x33334e){throw new Error(util[_0x8d4a('0x18')]('Process\x20with\x20pid\x20%s\x20not\x20found!',_0xf75981[_0x8d4a('0x13')][_0x8d4a('0x14')]));}process[_0x8d4a('0x19')](_0xf75981[_0x8d4a('0x13')]['pid'],'SIGINT');return _0x3c1a5b[_0x8d4a('0xa')](0xc8)[_0x8d4a('0xf')]({'message':util['format']('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0xf75981['params'][_0x8d4a('0x14')])});})['catch'](handleError(_0x3c1a5b,null,'killProcess'));};
\ No newline at end of file
+var _0x6741=['components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','split','length','indexOf','kill','Process\x20with\x20pid\x20%s\x20killed\x20correctly','child_process','exec','../../config/logger','api','util','lodash','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','name','status','send','index','getAllData','json','catch','killProcess'];(function(_0x38f8e9,_0x36eede){var _0x269e6a=function(_0x120dda){while(--_0x120dda){_0x38f8e9['push'](_0x38f8e9['shift']());}};_0x269e6a(++_0x36eede);}(_0x6741,0x136));var _0x1674=function(_0x4d0456,_0x382073){_0x4d0456=_0x4d0456-0x0;var _0x2c7b54=_0x6741[_0x4d0456];return _0x2c7b54;};'use strict';var info=require('systeminformation');var exec=require(_0x1674('0x0'))[_0x1674('0x1')];var logger=require(_0x1674('0x2'))(_0x1674('0x3'));var util=require(_0x1674('0x4'));var BPromise=require('bluebird');var _=require(_0x1674('0x5'));function handleError(_0x3f5470,_0x3bce75,_0x6a9f57){_0x3bce75=_0x3bce75||0x1f4;return function(_0xd3f837){logger['error'](_0x1674('0x6'),_0x6a9f57,_0x3bce75,util['inspect'](_0xd3f837,{'showHidden':![],'depth':null}));delete _0xd3f837[_0x1674('0x7')];_0x3f5470[_0x1674('0x8')](_0x3bce75)[_0x1674('0x9')](_0xd3f837);};}exports[_0x1674('0xa')]=function(_0x1d8aed,_0x3884d2){return info[_0x1674('0xb')]()['then'](function(_0x414976){return _0x3884d2[_0x1674('0x8')](0xc8)[_0x1674('0xc')](_0x414976);})[_0x1674('0xd')](function(_0x1b2edc){return _0x3884d2[_0x1674('0x8')](0x1f4)[_0x1674('0xc')](_0x1b2edc);});};exports[_0x1674('0xe')]=function(_0x46926b,_0x4d3b40){var _0x3f5e61=[_0x1674('0xf')];return new BPromise(function(_0x3896fc,_0x57de88){return exec(util[_0x1674('0x10')](_0x1674('0x11'),_0x46926b[_0x1674('0x12')][_0x1674('0x13')]),function(_0x1d7169,_0x2f2fe4,_0x23892f){if(_0x1d7169){return _0x57de88(_0x1d7169);}return _0x3896fc(_0x2f2fe4);});})['then'](function(_0x11e22e){var _0x1c7b51=![];var _0x5d3fb1=_0x11e22e[_0x1674('0x14')](/\n/);for(var _0x353247=0x0,_0x2557b3=_0x3f5e61[_0x1674('0x15')];_0x353247<_0x2557b3,_0x1c7b51===![];_0x353247+=0x1){if(_0x11e22e[_0x1674('0x16')](_0x3f5e61[_0x353247])>=0x0){_0x1c7b51=!![];}}if(!_0x1c7b51){throw new Error(util['format']('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x46926b[_0x1674('0x12')][_0x1674('0x13')]));}process[_0x1674('0x17')](_0x46926b[_0x1674('0x12')][_0x1674('0x13')],'SIGINT');return _0x4d3b40[_0x1674('0x8')](0xc8)[_0x1674('0xc')]({'message':util[_0x1674('0x10')](_0x1674('0x18'),_0x46926b['params'][_0x1674('0x13')])});})[_0x1674('0xd')](handleError(_0x4d3b40,null,'killProcess'));};
\ No newline at end of file