Ignacio Falco 4 роки тому
джерело
коміт
827abde2b5
6 змінених файлів з 280 додано та 2 видалено
  1. 65
    0
      apply-config.sh
  2. 9
    0
      create_users.sh
  3. 138
    0
      guest-wait.html
  4. 19
    0
      inactivity_config.sh
  5. 48
    0
      scalelite-setup.sh
  6. 1
    2
      scalelite_batch_import.sh

+ 65
- 0
apply-config.sh Переглянути файл

@@ -0,0 +1,65 @@
1
+#!/bin/bash
2
+
3
+# Pull in the helper functions for configuring BigBlueButton
4
+source /etc/bigbluebutton/bbb-conf/apply-lib.sh
5
+
6
+enableUFWRules
7
+
8
+sed -i 's/defaultWelcomeMessage=.*/defaultWelcomeMessage=Bienvenido a <b>%%CONFNAME%%<\/b>!<br>/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
9
+sed -i 's/defaultWelcomeMessageFooter=.*/defaultWelcomeMessageFooter=Provisto por <a href="https:\/\/digitalcse.com\/" target="_blank"><u>DigitalCSE<\/u><\/a> /g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
10
+echo "" > /var/www/bigbluebutton-default/index.html
11
+
12
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.app.clientTitle 'DigitalCSE'
13
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.app.appName 'DigitalCSE Client'
14
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.app.copyright '2020 DigitalCSE Inc.'
15
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.app.helpLink 'https://digitalcse.com'
16
+
17
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[0].bitrate 50
18
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[1].bitrate 100
19
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[2].bitrate 150
20
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[3].bitrate 200
21
+
22
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[0].default true
23
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[1].default false
24
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[2].default false
25
+yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[3].default false
26
+
27
+#sed -i 's/defaultMaxUsers=.*/defaultMaxUsers=120/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
28
+sed -i 's/defaultMeetingDuration=.*/defaultMeetingDuration=720/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
29
+#sed -i 's/maxInactivityTimeoutMinutes=.*/maxInactivityTimeoutMinutes=60/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
30
+#sed -i 's/clientLogoutTimerInMinutes=.*/clientLogoutTimerInMinutes=120/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
31
+#sed -i 's/warnMinutesBeforeMax=.*/warnMinutesBeforeMax=5/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
32
+#sed -i 's/meetingExpireIfNoUserJoinedInMinutes=.*/meetingExpireIfNoUserJoinedInMinutes=5/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
33
+#sed -i 's/meetingExpireWhenLastUserLeftInMinutes=.*/meetingExpireWhenLastUserLeftInMinutes=1/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
34
+#sed -i 's/userInactivityThresholdInMinutes=.*/userInactivityThresholdInMinutes=120/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
35
+#sed -i 's/userActivitySignResponseDelayInMinutes=.*/userActivitySignResponseDelayInMinutes=5/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
36
+sed -i 's/allowStartStopRecording=.*/allowStartStopRecording=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
37
+sed -i 's/lockSettingsDisableCam=.*/lockSettingsDisableCam=true/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
38
+sed -i 's/lockSettingsDisableMic=.*/lockSettingsDisableMic=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
39
+sed -i 's/lockSettingsDisablePrivateChat=.*/lockSettingsDisablePrivateChat=true/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
40
+sed -i 's/lockSettingsDisablePublicChat=.*/lockSettingsDisablePublicChat=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
41
+sed -i 's/lockSettingsDisableNote=.*/lockSettingsDisableNote=true/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
42
+sed -i 's/lockSettingsHideUserList=.*/lockSettingsHideUserList=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
43
+sed -i 's/lockSettingsLockedLayout=.*/lockSettingsLockedLayout=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
44
+sed -i 's/lockSettingsLockOnJoin=.*/lockSettingsLockOnJoin=true/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
45
+sed -i 's/lockSettingsLockOnJoinConfigurable=.*/lockSettingsLockOnJoinConfigurable=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
46
+
47
+if [ ! -f /var/www/bigbluebutton-default/default_presentation_agl.pdf ]; then
48
+    wget -O /var/www/bigbluebutton-default/default_presentation_agl.pdf  https://storage.googleapis.com/agl-01/default_presentation_agl.pdf
49
+fi
50
+
51
+cp /var/www/bigbluebutton-default/default_presentation_agl.pdf /var/www/bigbluebutton-default/default.pdf
52
+
53
+if [ ! -f /var/www/bigbluebutton-default/LOGO_CSE-FINAL.ico ]; then
54
+    wget -O /var/www/bigbluebutton-default/LOGO_CSE-FINAL.ico  https://storage.googleapis.com/agl-01/LOGO-CSE-FINAL.ico
55
+fi
56
+
57
+cp /var/www/bigbluebutton-default/LOGO_CSE-FINAL.ico /var/www/bigbluebutton-default/favicon.ico
58
+
59
+sed -i 's/defaultCopyright = .*/defaultCopyright = "<p>DigitalCSE<\/p>"/g' /var/bigbluebutton/playback/presentation/2.0/playback.js
60
+
61
+if [ ! -f /var/www/bigbluebutton/client/guest-wait-digitalcse.html ]; then
62
+	wget -O /var/www/bigbluebutton/client/guest-wait-digitalcse.html http://git.bluekitsune.com/bluekitsune-public/customfiles/raw/branch/master/guest-wait.html
63
+fi
64
+
65
+cp /var/www/bigbluebutton/client/guest-wait-digitalcse.html /var/www/bigbluebutton/client/guest-wait.html

+ 9
- 0
create_users.sh Переглянути файл

@@ -0,0 +1,9 @@
1
+#! /bin/bash
2
+
3
+while read line; do
4
+    IFS=';' read -ra params <<< "$line"
5
+    cmd="bundle exec rake user:create[\"${params[0]}\",\"${params[1]}\",\"${params[2]}\",\"user\"]"
6
+    eval $cmd
7
+
8
+IFS=' '
9
+done < $1

+ 138
- 0
guest-wait.html Переглянути файл

@@ -0,0 +1,138 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+  <title>Sala de Espera</title>
5
+  <meta charset="UTF-8">
6
+  <style>
7
+    body {
8
+    display: flex;
9
+    justify-content: center;
10
+    align-items: center;
11
+    background: #06172A;
12
+    height: 100vh;
13
+    margin: 0;
14
+  }
15
+  #content {
16
+    text-align: center;
17
+    color: white;
18
+    font-weight: bold;
19
+    font-size: 24px;
20
+    font-family: arial, sans-serif;
21
+  }
22
+  .spinner {
23
+    margin: 20px auto;
24
+  }
25
+  .spinner .bounce1 {
26
+    animation-delay: -0.32s;
27
+  }
28
+  .spinner .bounce2 {
29
+    animation-delay: -0.16s;
30
+  }
31
+  .spinner > div {
32
+    width: 30px;
33
+    height: 30px;
34
+    background-color: rgb(255, 255, 255);
35
+    display: inline-block;
36
+    border-radius: 100%;
37
+    animation: 1.4s ease-in-out 0s infinite normal both running sk-bouncedelay;
38
+  }
39
+  @-webkit-keyframes sk-bouncedelay {
40
+      0%, 80%, 100% {
41
+          -webkit-transform: scale(0)
42
+      }
43
+      40% {
44
+          -webkit-transform: scale(1.0)
45
+      }
46
+  }
47
+
48
+  @keyframes sk-bouncedelay {
49
+      0%, 80%, 100% {
50
+          -webkit-transform: scale(0);
51
+          transform: scale(0);
52
+      }
53
+      40% {
54
+          -webkit-transform: scale(1.0);
55
+          transform: scale(1.0);
56
+      }
57
+  }
58
+  </style>
59
+
60
+  <script src="lib/jquery-2.1.1.min.js" type="text/javascript"></script>
61
+  
62
+  <script type="text/javascript">
63
+    function updateMessage(message) {
64
+      $('#content > p').html(message);
65
+    }
66
+
67
+    function findSessionToken() {
68
+      return location.search
69
+        .substr(1)
70
+        .split('&')
71
+        .find(function(item) {
72
+          return item.split('=')[0] === 'sessionToken'
73
+        });
74
+    };
75
+
76
+    function fetchGuestWait(sessionToken) {
77
+      const GUEST_WAIT_ENDPOINT = '/bigbluebutton/api/guestWait';
78
+
79
+      return $.get(GUEST_WAIT_ENDPOINT, sessionToken.concat('&redirect=false'));
80
+    };
81
+
82
+    function pollGuestStatus(token, attempt, limit, everyMs) {
83
+      setTimeout(function() {
84
+        var REDIRECT_STATUSES = ['ALLOW', 'DENY'];
85
+
86
+
87
+        if (attempt >= limit) {
88
+          updateMessage('No respons from Moderator');
89
+          return;
90
+        }
91
+
92
+        fetchGuestWait(token).always(function(data) {
93
+          console.log("data=" + JSON.stringify(data));
94
+          var status = data.response.guestStatus;
95
+
96
+          if (REDIRECT_STATUSES.includes(status)) {
97
+            window.location = data.response.url;
98
+            return;
99
+          }
100
+
101
+          return pollGuestStatus(token, attempt + 1, limit, everyMs);
102
+        })
103
+      }, everyMs);
104
+    };
105
+
106
+    window.onload = function() {
107
+      try {
108
+        var ATTEMPT_EVERY_MS = 5000;
109
+        var ATTEMPT_LIMIT = 100;
110
+
111
+        var sessionToken = findSessionToken();
112
+
113
+        if(!sessionToken) {
114
+          updateMessage('No session Token received');
115
+          return;
116
+        }
117
+
118
+        pollGuestStatus(sessionToken, 0, ATTEMPT_LIMIT, ATTEMPT_EVERY_MS);
119
+      } catch (e) {
120
+        console.error(e);
121
+        updateMessage('Error: more details in the console');
122
+      }
123
+    };
124
+  </script>
125
+</head>
126
+
127
+<body>
128
+  <div id="content">
129
+    <div class="spinner">
130
+      <div class="bounce1"></div>
131
+      <div class="bounce2"></div>
132
+      <div class="bounce3"></div>
133
+    </div>
134
+    <p>Por favor, espere a que un moderador lo apruebe para unirse a la sala.</p>
135
+  </div>
136
+</body>
137
+
138
+</html>

+ 19
- 0
inactivity_config.sh Переглянути файл

@@ -0,0 +1,19 @@
1
+#! /bin/bash
2
+
3
+cp /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.bak
4
+
5
+sed -i 's/^\(defaultMaxUsers\s*=\s*\).*$/\135/' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
6
+sed -i 's/^\(defaultMeetingDuration\s*=\s*\).*$/\10/' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
7
+sed -i 's/^\(maxInactivityTimeoutMinutes\s*=\s*\).*$/\115/' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
8
+sed -i 's/^\(clientLogoutTimerInMinutes\s*=\s*\).*$/\15/' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
9
+sed -i 's/^\(warnMinutesBeforeMax\s*=\s*\).*$/\15/' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
10
+sed -i 's/^\(meetingExpireIfNoUserJoinedInMinutes\s*=\s*\).*$/\15/' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
11
+sed -i 's/^\(meetingExpireWhenLastUserLeftInMinutes\s*=\s*\).*$/\11/' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
12
+sed -i 's/^\(userInactivityInspectTimerInMinutes\s*=\s*\).*$/\15/' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
13
+sed -i 's/^\(userInactivityThresholdInMinutes\s*=\s*\).*$/\115/' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
14
+sed -i 's/^\(userActivitySignResponseDelayInMinutes\s*=\s*\).*$/\15/' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
15
+
16
+
17
+bbb-conf --restart
18
+
19
+echo Listo

+ 48
- 0
scalelite-setup.sh Переглянути файл

@@ -0,0 +1,48 @@
1
+#!/bin/sh
2
+STORAGE_KEY = "KEYHERE"
3
+STORAGE_SECRET = "SECRETHERE"
4
+STORAGE_NAME = "NAMEHERE"
5
+
6
+########################### ADD STORAGE   ####################################
7
+apt-get install -y s3fs
8
+echo "$STORAGE_KEY:$STORAGE_SECRET" > /root/.passwd-s3fs
9
+chmod 600 /root/.passwd-s3fs
10
+
11
+mkdir -p /mnt/storage01
12
+mkdir -p /mnt/storage01/published
13
+
14
+# Creating FSTAB backup
15
+cp /etc/fstab /etc/fstab.bak
16
+
17
+# Adding Storate to FSTAB
18
+echo "s3fs#$STORAGE_NAME /mnt/storage01 fuse allow_other,use_path_request_style,passwd_file=/root/.passwd-s3fs,_netdev,nosuid,uid=1000,gid=1000,nodev,url=https://nyc3.digitaloceanspaces.com 0 0" >> /etc/fstab
19
+
20
+mount -a
21
+
22
+########################### SHARED VOLUME ####################################
23
+# Create the spool directory for recording transfer from BigBlueButton
24
+ln -s /mnt/storage01/spool /mnt/scalelite-recordings/var/bigbluebutton
25
+chown -h 1000:1000 /mnt/scalelite-recordings/var/bigbluebutton/spool
26
+chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/spool
27
+
28
+# Create the temporary (working) directory for recording import
29
+mkdir -p /mnt/scalelite-recordings/var/bigbluebutton/recording/scalelite
30
+chown 1000:1000 /mnt/scalelite-recordings/var/bigbluebutton/recording/scalelite
31
+chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/recording/scalelite
32
+
33
+# Create the directory for published recordings
34
+ln -s /mnt/storage01/published /mnt/scalelite-recordings/var/bigbluebutton/published
35
+chown -h 1000:1000 /mnt/scalelite-recordings/var/bigbluebutton/published
36
+chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/published
37
+
38
+# Create the directory for unpublished recordings
39
+mkdir -p /mnt/scalelite-recordings/var/bigbluebutton/unpublished
40
+chown 1000:1000 /mnt/scalelite-recordings/var/bigbluebutton/unpublished
41
+chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/unpublished
42
+
43
+########################### REPO CLONING ####################################
44
+
45
+git clone http://git.bluekitsune.com/bluekitsune-public/scalelite-run.git
46
+cd scalelite-run
47
+docker-compose up -d
48
+

+ 1
- 2
scalelite_batch_import.sh Переглянути файл

@@ -16,6 +16,5 @@ for done_file in "$status_dir"/*.done; do
16 16
 
17 17
     prev_record_id="$record_id"
18 18
     echo "$record_id"
19
-    ( cd "$scripts_dir" && sudo -n -u bigbluebutton ./post_publish/scalelite_post_publish.rb -m 6ca54fd83558eb5af468fa0c9a80ce0d6406884c-1590172366578 )
20
-    break
19
+    ( cd "$scripts_dir" && sudo -n -u bigbluebutton ./post_publish/scalelite_post_publish.rb -m "$record_id" )
21 20
 done

Завантаження…
Відмінити
Зберегти