-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_info
33 lines (32 loc) · 1.13 KB
/
user_info
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
read -p "username:" myuser
export myuser
read -p "email:" myemail
export myemail
read -p "pass:" mypass
export mypass
read -p "enter roomname:" room_name
export room_name
bundle exec rake user:create["$myuser","$myemail","$mypass","Teachers"]
cat ./sampleuserid > userid.rb
sed -i "s/myemail/$myemail/g" userid.rb
bin/rails runner ./userid.rb
user_id=$(cat ./user_id.out)
export user_id
source ./create-room.sh
room_id=$(cat ./room_id.out)
export room_id
room_uid=$(cat ./room_uid.out)
export room_uid
cat ./sampleshare > share_access.rb
sed -i "s/roomid/$room_id/g" share_access.rb
sed -i "s/userid/$user_id/g" share_access.rb
sed -i "s/roomuid/$room_uid/g" share_access.rb
sed -i "s/roomname/$room_name/g" share_access.rb
bin/rails runner ./share_access.rb
echo "New Account Detail:"
echo "Login: http://bbblive.tehranclass.ir/b/signin"
echo "Room URL: http://bbblive.tehranclass.ir/b/$room_name"
echo "Username: $myuser"
echo "Email: $myemail"
echo "Password: $mypass"