Built motion from commit 538092ac.|2.6.10
[motion2.git] / server / config / seedUsers.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x16e8=['wss','ulaw','yes','/etc/pki/tls/certs/motion.crt','actpass','\x22%s\x22\x20<%s>','log','add\x20user','catch','util','../mysqldb','push','format','%s%s','agent','%s%s@xcally.com','password'];(function(_0x2f5a22,_0x5e9f03){var _0x326b70=function(_0x1b7bf9){while(--_0x1b7bf9){_0x2f5a22['push'](_0x2f5a22['shift']());}};_0x326b70(++_0x5e9f03);}(_0x16e8,0xb3));var _0x816e=function(_0x18c3ca,_0x5100e2){_0x18c3ca=_0x18c3ca-0x0;var _0x52ec09=_0x16e8[_0x18c3ca];return _0x52ec09;};'use strict';var util=require(_0x816e('0x0'));var db=require(_0x816e('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x816e('0x2')]({'name':util[_0x816e('0x3')](_0x816e('0x4'),_0x816e('0x5'),i),'fullname':util[_0x816e('0x3')](_0x816e('0x4'),_0x816e('0x5'),i),'email':util['format'](_0x816e('0x6'),_0x816e('0x5'),i),'role':_0x816e('0x5'),'password':_0x816e('0x7'),'internal':0xfa0+i,'type':'friend','transport':['udp','ws',_0x816e('0x8')],'disallow':['all'],'allow':[_0x816e('0x9')],'defaultuser':util['format'](_0x816e('0x4'),_0x816e('0x5'),i),'encryption':_0x816e('0xa'),'avpf':'yes','force_avp':'yes','icesupport':'yes','dtlsenable':_0x816e('0xa'),'dtlsverify':'no','dtlscertfile':_0x816e('0xb'),'dtlsprivatekey':'/etc/pki/tls/private/motion.key','dtlssetup':_0x816e('0xc'),'callerid':util[_0x816e('0x3')](_0x816e('0xd'),util[_0x816e('0x3')]('%s%s',_0x816e('0x5'),i),0xfa0+i)});}db['User']['bulkCreate'](users)['then'](function(){console[_0x816e('0xe')](_0x816e('0xf'));})[_0x816e('0x10')](function(_0x20c69b){console[_0x816e('0xe')](_0x20c69b);});