PageRenderTime 142ms CodeModel.GetById 81ms app.highlight 3ms RepoModel.GetById 57ms app.codeStats 0ms

/benchmarks/scenarii/one_to_many.sh

http://github.com/AF83/ucengine
Shell | 42 lines | 30 code | 9 blank | 3 comment | 3 complexity | eedc1fcf81ba9ada2e40da3184ed73a6 MD5 | raw file
 1#!/usr/bin/env bash
 2
 3UCENGINE_ADMIN="ucengine-admin"
 4
 5HOST=$1
 6
 7if [ -z $HOST ];
 8then
 9    echo "You must provide a domain. $0 <domain>"
10    exit 1
11fi
12
13MEETINGS="demo demo2"
14
15for meeting in $MEETINGS
16do
17    echo "Creating meeting $meeting"
18    $UCENGINE_ADMIN $HOST meeting add $meeting
19done
20
21# Role participant
22$UCENGINE_ADMIN $HOST role add participant
23$UCENGINE_ADMIN $HOST role access add participant "add" "presence"
24$UCENGINE_ADMIN $HOST role access add participant "get" "infos"
25$UCENGINE_ADMIN $HOST role access add participant "add" "roster"
26$UCENGINE_ADMIN $HOST role access add participant "get" "meeting"
27$UCENGINE_ADMIN $HOST role access add participant "list" "meeting"
28$UCENGINE_ADMIN $HOST role access add participant "view" "video"
29$UCENGINE_ADMIN $HOST role access add participant "all" "event"
30
31
32FILE="users.csv"
33
34# Users
35rm -f $FILE
36for id in $(seq 1 1200)
37do
38  user="participant_$id"
39  $UCENGINE_ADMIN $HOST user add $user "password" "pwd"
40  $UCENGINE_ADMIN $HOST user role add $user "participant"
41  echo "$user;pwd" >> $FILE
42done