Built motion from commit 97153652.|2.6.26
[motion2.git] / server / services / routing / server / applications / system.js
index b5d4c7d..a57f228 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4585=['isNil','[%s][SYSTEM]\x20no\x20variable','body','isObject','validate','shelljs','lodash','./utils','../../../../config/logger','consequence','length','error','message','join','info','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','next','getMustacheRender','trim','[%s][SYSTEM]\x20result\x20code:\x20%s','replace'];(function(_0x1f109c,_0xd9952e){var _0x3984e8=function(_0x40b60b){while(--_0x40b60b){_0x1f109c['push'](_0x1f109c['shift']());}};_0x3984e8(++_0xd9952e);}(_0x4585,0x115));var _0x5458=function(_0x2f45ea,_0x15c656){_0x2f45ea=_0x2f45ea-0x0;var _0x485a84=_0x4585[_0x2f45ea];return _0x485a84;};'use strict';var schema=require(_0x5458('0x0'));var sh=require(_0x5458('0x1'));var _=require(_0x5458('0x2'));var utils=require(_0x5458('0x3'));var logger=require(_0x5458('0x4'))('routing');var system=schema({'command':{'type':'string','required':!![],'message':'command\x20is\x20a\x20string\x20and\x20it\x20is\x20required'}});exports[_0x5458('0x5')]=function(_0x3f9236,_0x46da6b){return function(_0x53b51c){try{var _0xb0a208={'command':_0x46da6b[0x0]};var _0x21b231=system[_0x5458('0x0')](_0xb0a208,{'typecast':!![]});if(_0x21b231[_0x5458('0x6')]){logger[_0x5458('0x7')]('[%s][SYSTEM]\x20%s',_0x3f9236,_['map'](_0x21b231,_0x5458('0x8'))[_0x5458('0x9')](',\x20'));logger[_0x5458('0xa')](_0x5458('0xb'),_0x3f9236);_0x53b51c[_0x5458('0xc')]();}else{var _0x21a6de=this;var _0x36d112=utils[_0x5458('0xd')](_0x46da6b[0x0],this);logger[_0x5458('0xa')]('[%s][SYSTEM]\x20commnad:\x20%s',_0x3f9236,_0x36d112);sh['exec'](_[_0x5458('0xe')](_0x36d112),function(_0x3f3be4,_0x36b548){logger[_0x5458('0xa')](_0x5458('0xf'),_0x3f9236,_0x3f3be4);if(_0x3f3be4==0x0){var _0x236ce1=_0x36b548[_0x5458('0x10')](/(\r\n|\n|\r)/gm,'');if(_[_0x5458('0x11')](_0x46da6b[0x1])||_['isEmpty'](_0x46da6b[0x1])){logger[_0x5458('0xa')](_0x5458('0x12'),_0x3f9236);_0x21a6de[_0x5458('0x13')][_0x46da6b[0x1]]=_0x236ce1;}else{logger['info']('[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s',_0x3f9236,_0x46da6b[0x1],_0x236ce1);_0x21a6de[_0x5458('0x13')][_0x46da6b[0x1]]=_0x236ce1;}}_0x53b51c[_0x5458('0xc')]();});}}catch(_0x5ec201){logger[_0x5458('0x7')]('[%s][SYSTEM]\x20%s',_0x3f9236,_[_0x5458('0x14')](_0x5ec201)?JSON['stringify'](_0x5ec201):_0x5ec201);logger[_0x5458('0xa')](_0x5458('0xb'),_0x3f9236);_0x53b51c[_0x5458('0xc')]();}};};
\ No newline at end of file
+var _0xf13e=['isEmpty','[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','error','isObject','validate','shelljs','lodash','./utils','../../../../config/logger','routing','consequence','[%s][SYSTEM]\x20%s','message','join','info','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','next','getMustacheRender','[%s][SYSTEM]\x20commnad:\x20%s','exec','trim','[%s][SYSTEM]\x20result\x20code:\x20%s','replace'];(function(_0x4b7067,_0x365795){var _0x2c93be=function(_0x4f21af){while(--_0x4f21af){_0x4b7067['push'](_0x4b7067['shift']());}};_0x2c93be(++_0x365795);}(_0xf13e,0x6a));var _0xef13=function(_0x572dd8,_0x227286){_0x572dd8=_0x572dd8-0x0;var _0x4e3e5a=_0xf13e[_0x572dd8];return _0x4e3e5a;};'use strict';var schema=require(_0xef13('0x0'));var sh=require(_0xef13('0x1'));var _=require(_0xef13('0x2'));var utils=require(_0xef13('0x3'));var logger=require(_0xef13('0x4'))(_0xef13('0x5'));var system=schema({'command':{'type':'string','required':!![],'message':'command\x20is\x20a\x20string\x20and\x20it\x20is\x20required'}});exports[_0xef13('0x6')]=function(_0x1c51d0,_0x287fb8){return function(_0x2e2545){try{var _0x570bd5={'command':_0x287fb8[0x0]};var _0x41da9c=system[_0xef13('0x0')](_0x570bd5,{'typecast':!![]});if(_0x41da9c['length']){logger['error'](_0xef13('0x7'),_0x1c51d0,_['map'](_0x41da9c,_0xef13('0x8'))[_0xef13('0x9')](',\x20'));logger[_0xef13('0xa')](_0xef13('0xb'),_0x1c51d0);_0x2e2545[_0xef13('0xc')]();}else{var _0x1ceeac=this;var _0x57e95c=utils[_0xef13('0xd')](_0x287fb8[0x0],this);logger[_0xef13('0xa')](_0xef13('0xe'),_0x1c51d0,_0x57e95c);sh[_0xef13('0xf')](_[_0xef13('0x10')](_0x57e95c),function(_0x1a3ef1,_0x1f6287){logger['info'](_0xef13('0x11'),_0x1c51d0,_0x1a3ef1);if(_0x1a3ef1==0x0){var _0x44d8bf=_0x1f6287[_0xef13('0x12')](/(\r\n|\n|\r)/gm,'');if(_['isNil'](_0x287fb8[0x1])||_[_0xef13('0x13')](_0x287fb8[0x1])){logger['info'](_0xef13('0x14'),_0x1c51d0);_0x1ceeac[_0xef13('0x15')][_0x287fb8[0x1]]=_0x44d8bf;}else{logger[_0xef13('0xa')](_0xef13('0x16'),_0x1c51d0,_0x287fb8[0x1],_0x44d8bf);_0x1ceeac[_0xef13('0x15')][_0x287fb8[0x1]]=_0x44d8bf;}}_0x2e2545[_0xef13('0xc')]();});}}catch(_0x2dcbdf){logger[_0xef13('0x17')](_0xef13('0x7'),_0x1c51d0,_[_0xef13('0x18')](_0x2dcbdf)?JSON['stringify'](_0x2dcbdf):_0x2dcbdf);logger[_0xef13('0xa')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x1c51d0);_0x2e2545[_0xef13('0xc')]();}};};
\ No newline at end of file