1d3454b61bf71a1c2c3809e5867ecab6c9380bfd
[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 _0xdda0=['format','%s%s@xcally.com','password','friend','udp','wss','all','ulaw','%s%s','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','actpass','\x22%s\x22\x20<%s>','User','then','log','add\x20user','util','../mysqldb','push','agent'];(function(_0x5856d0,_0x296932){var _0x57c019=function(_0x12689b){while(--_0x12689b){_0x5856d0['push'](_0x5856d0['shift']());}};_0x57c019(++_0x296932);}(_0xdda0,0xc2));var _0x0dda=function(_0xf1375f,_0x490ae9){_0xf1375f=_0xf1375f-0x0;var _0x304f25=_0xdda0[_0xf1375f];return _0x304f25;};'use strict';var util=require(_0x0dda('0x0'));var db=require(_0x0dda('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x0dda('0x2')]({'name':util['format']('%s%s','agent',i),'fullname':util['format']('%s%s',_0x0dda('0x3'),i),'email':util[_0x0dda('0x4')](_0x0dda('0x5'),'agent',i),'role':_0x0dda('0x3'),'password':_0x0dda('0x6'),'internal':0xfa0+i,'type':_0x0dda('0x7'),'transport':[_0x0dda('0x8'),'ws',_0x0dda('0x9')],'disallow':[_0x0dda('0xa')],'allow':[_0x0dda('0xb')],'defaultuser':util[_0x0dda('0x4')](_0x0dda('0xc'),_0x0dda('0x3'),i),'encryption':_0x0dda('0xd'),'avpf':_0x0dda('0xd'),'force_avp':_0x0dda('0xd'),'icesupport':_0x0dda('0xd'),'dtlsenable':_0x0dda('0xd'),'dtlsverify':'no','dtlscertfile':_0x0dda('0xe'),'dtlsprivatekey':_0x0dda('0xf'),'dtlssetup':_0x0dda('0x10'),'callerid':util[_0x0dda('0x4')](_0x0dda('0x11'),util['format'](_0x0dda('0xc'),_0x0dda('0x3'),i),0xfa0+i)});}db[_0x0dda('0x12')]['bulkCreate'](users)[_0x0dda('0x13')](function(){console[_0x0dda('0x14')](_0x0dda('0x15'));})['catch'](function(_0x45fe23){console[_0x0dda('0x14')](_0x45fe23);});