Built motion from commit (unavailable).|2.5.21
[motion2.git] / server / app.js
index b9da371..8afded6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x18f3=['start','info','Online\x20apps:','online','name','join','Offline\x20apps:','map','filter','status','None','default','catch','error','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','./mysqldb','./rpc','./config/environment','./config/pm2','./config/schedule','./config/schedule/chat','./config/schedule/whatsapp','./config/schedule/transcribe','sync','then'];(function(_0x41092a,_0x5ccb0c){var _0x3fa970=function(_0x4763c6){while(--_0x4763c6){_0x41092a['push'](_0x41092a['shift']());}};_0x3fa970(++_0x5ccb0c);}(_0x18f3,0x19f));var _0x318f=function(_0x1d24eb,_0x12295b){_0x1d24eb=_0x1d24eb-0x0;var _0x1dc576=_0x18f3[_0x1d24eb];return _0x1dc576;};'use strict';var _=require('lodash');var mysqldb=require(_0x318f('0x0'));var rpc=require(_0x318f('0x1'));var config=require(_0x318f('0x2'));var logger=require('./config/logger')('app');var pm2=require(_0x318f('0x3'));var pm2Config=require('./config/pm2/config');var schedule=require(_0x318f('0x4'));var chat=require(_0x318f('0x5'));var whatsapp=require(_0x318f('0x6'));var transcribe=require(_0x318f('0x7'));function main(){return mysqldb['db']['sequelize'][_0x318f('0x8')]()[_0x318f('0x9')](function(){return rpc['listen']();})['then'](function(_0x4618c1){logger['info'](_0x4618c1);return chat[_0x318f('0xa')]();})[_0x318f('0x9')](function(){return whatsapp[_0x318f('0xa')]();})[_0x318f('0x9')](function(){return schedule[_0x318f('0xa')]();})[_0x318f('0x9')](function(){return transcribe[_0x318f('0xa')]();})[_0x318f('0x9')](function(_0x1e9916){logger[_0x318f('0xb')](_0x1e9916);return pm2[_0x318f('0xa')](pm2Config);})[_0x318f('0x9')](function(_0x3098f9){logger[_0x318f('0xb')](_0x318f('0xc'),_['map'](_['filter'](_0x3098f9,{'status':_0x318f('0xd')}),_0x318f('0xe'))[_0x318f('0xf')]());logger[_0x318f('0xb')](_0x318f('0x10'),_[_0x318f('0x11')](_[_0x318f('0x12')](_0x3098f9,function(_0x4e6b05){return _0x4e6b05[_0x318f('0x13')]!=='online';}),'name')[_0x318f('0xf')]()||_0x318f('0x14'));config['seedDB']&&require('./config/seedDB')[_0x318f('0x15')]();require('./config/license')[_0x318f('0x15')]();})[_0x318f('0x16')](function(_0x2ff62b){logger[_0x318f('0x17')](_0x318f('0x18'),_0x2ff62b);process['exit'](0x1);});}main();
\ No newline at end of file
+var _0xb44a=['Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','exit','./rpc','./config/logger','./config/pm2/config','./config/schedule/chat','./config/schedule/whatsapp','./config/schedule/transcribe','sequelize','sync','then','listen','info','start','Online\x20apps:','online','join','Offline\x20apps:','map','filter','status','None','seedDB','./config/seedDB','default','./config/license','catch','error'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0xb44a,0x1c2));var _0xab44=function(_0x1c7137,_0x4c7c26){_0x1c7137=_0x1c7137-0x0;var _0xeb4432=_0xb44a[_0x1c7137];return _0xeb4432;};'use strict';var _=require('lodash');var mysqldb=require('./mysqldb');var rpc=require(_0xab44('0x0'));var config=require('./config/environment');var logger=require(_0xab44('0x1'))('app');var pm2=require('./config/pm2');var pm2Config=require(_0xab44('0x2'));var schedule=require('./config/schedule');var chat=require(_0xab44('0x3'));var whatsapp=require(_0xab44('0x4'));var transcribe=require(_0xab44('0x5'));function main(){return mysqldb['db'][_0xab44('0x6')][_0xab44('0x7')]()[_0xab44('0x8')](function(){return rpc[_0xab44('0x9')]();})[_0xab44('0x8')](function(_0x137a8c){logger[_0xab44('0xa')](_0x137a8c);return chat[_0xab44('0xb')]();})[_0xab44('0x8')](function(){return whatsapp[_0xab44('0xb')]();})['then'](function(){return schedule[_0xab44('0xb')]();})['then'](function(){return transcribe[_0xab44('0xb')]();})['then'](function(_0x4a4e69){logger[_0xab44('0xa')](_0x4a4e69);return pm2[_0xab44('0xb')](pm2Config);})[_0xab44('0x8')](function(_0x34ca94){logger[_0xab44('0xa')](_0xab44('0xc'),_['map'](_['filter'](_0x34ca94,{'status':_0xab44('0xd')}),'name')[_0xab44('0xe')]());logger['info'](_0xab44('0xf'),_[_0xab44('0x10')](_[_0xab44('0x11')](_0x34ca94,function(_0x384f02){return _0x384f02[_0xab44('0x12')]!==_0xab44('0xd');}),'name')['join']()||_0xab44('0x13'));config[_0xab44('0x14')]&&require(_0xab44('0x15'))[_0xab44('0x16')]();require(_0xab44('0x17'))[_0xab44('0x16')]();})[_0xab44('0x18')](function(_0x44fa43){logger[_0xab44('0x19')](_0xab44('0x1a'),_0x44fa43);process[_0xab44('0x1b')](0x1);});}main();
\ No newline at end of file