PageRenderTime 288ms CodeModel.GetById 136ms app.highlight 4ms RepoModel.GetById 113ms app.codeStats 0ms

/rel/files/demo.sh

http://github.com/AF83/ucengine
Shell | 50 lines | 32 code | 12 blank | 6 comment | 2 complexity | efeb3c37f87bb92ef8a4e7202ac4c175 MD5 | raw file
 1#!/bin/sh
 2
 3CWD=$(dirname $0)
 4
 5UCENGINE_ADMIN="$CWD/ucengine-admin"
 6
 7HOST=$1
 8
 9if [ -z $HOST ];
10then
11    echo "You must provide a domain. $0 <domain>"
12    exit 1
13fi
14
15$UCENGINE_ADMIN $HOST meeting add "demo"  --name "Demonstration room" --description "U.C.Engine demonstration room"
16$UCENGINE_ADMIN $HOST meeting add "demo2" --name "Another room"       --description "Another test room"
17
18# Role participant
19$UCENGINE_ADMIN $HOST role add participant
20$UCENGINE_ADMIN $HOST role access add participant "add" "presence"
21$UCENGINE_ADMIN $HOST role access add participant "add" "roster"
22$UCENGINE_ADMIN $HOST role access add participant "get" "meeting"
23$UCENGINE_ADMIN $HOST role access add participant "list" "meeting"
24$UCENGINE_ADMIN $HOST role access add participant "view" "video"
25$UCENGINE_ADMIN $HOST role access add participant "all" "event"
26
27# Role speaker
28$UCENGINE_ADMIN $HOST role add speaker
29
30# Role owner
31$UCENGINE_ADMIN $HOST role add owner
32$UCENGINE_ADMIN $HOST role access add owner "update" "meeting"
33$UCENGINE_ADMIN $HOST role access add owner "add" "user.role" --role "speaker"
34$UCENGINE_ADMIN $HOST role access add owner "delete" "user.role" --role "speaker"
35
36# Users
37USERS="participant participant2 participant3 owner"
38
39for user in $USERS
40do
41  echo "Create user $user"
42  $UCENGINE_ADMIN $HOST user add $user "password" "pwd"
43  $UCENGINE_ADMIN $HOST user role add $user "participant"
44done
45
46$UCENGINE_ADMIN $HOST user role add "owner" "owner" --location "demo"
47$UCENGINE_ADMIN $HOST user role add "owner" "owner" --location "demo2"
48
49# anonymous
50$UCENGINE_ADMIN $HOST user add "anonymous" "none" ""