123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #!/bin/bash
- # Pull in the helper functions for configuring BigBlueButton
- source /etc/bigbluebutton/bbb-conf/apply-lib.sh
-
- enableUFWRules
-
- sed -i 's/defaultWelcomeMessage=.*/defaultWelcomeMessage=Bienvenido a <b>%%CONFNAME%%<\/b>!<br>/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- 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
- echo "" > /var/www/bigbluebutton-default/index.html
-
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.app.clientTitle 'DigitalCSE'
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.app.appName 'DigitalCSE Client'
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.app.copyright '2020 DigitalCSE Inc.'
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.app.helpLink 'https://digitalcse.com'
-
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[6].bitrate 50
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[7].bitrate 100
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[8].bitrate 150
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[9].bitrate 200
-
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[6].default true
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[7].default false
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[8].default false
- yq w -i /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml public.kurento.cameraProfiles.[9].default false
-
- sed -i 's/defaultMaxUsers=.*/defaultMaxUsers=100/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- sed -i 's/defaultMeetingDuration=.*/defaultMeetingDuration=720/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- sed -i 's/allowStartStopRecording=.*/allowStartStopRecording=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- sed -i 's/lockSettingsDisableCam=.*/lockSettingsDisableCam=true/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- sed -i 's/lockSettingsDisableMic=.*/lockSettingsDisableMic=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- sed -i 's/lockSettingsDisablePrivateChat=.*/lockSettingsDisablePrivateChat=true/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- sed -i 's/lockSettingsDisablePublicChat=.*/lockSettingsDisablePublicChat=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- sed -i 's/lockSettingsDisableNote=.*/lockSettingsDisableNote=true/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- sed -i 's/lockSettingsHideUserList=.*/lockSettingsHideUserList=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- sed -i 's/lockSettingsLockedLayout=.*/lockSettingsLockedLayout=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- sed -i 's/lockSettingsLockOnJoin=.*/lockSettingsLockOnJoin=true/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
- sed -i 's/lockSettingsLockOnJoinConfigurable=.*/lockSettingsLockOnJoinConfigurable=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
-
- if [ ! -f /var/www/bigbluebutton-default/default_presentation_sanantonio.pdf ]; then
- wget -O /var/www/bigbluebutton-default/default_presentation_sanantonio.pdf https://sanantonio.sfo2.digitaloceanspaces.com/presentation.pdf
- fi
-
- cp /var/www/bigbluebutton-default/default_presentation_sanantonio.pdf /var/www/bigbluebutton-default/default.pdf
-
- if [ ! -f /var/www/bigbluebutton-default/LOGO_CSE-FINAL.ico ]; then
- wget -O /var/www/bigbluebutton-default/LOGO_CSE-FINAL.ico https://storage.googleapis.com/agl-01/LOGO-CSE-FINAL.ico
- fi
-
- cp /var/www/bigbluebutton-default/LOGO_CSE-FINAL.ico /var/www/bigbluebutton-default/favicon.ico
-
- sed -i 's/defaultCopyright = .*/defaultCopyright = "<p>DigitalCSE<\/p>"/g' /var/bigbluebutton/playback/presentation/2.0/playback.js
-
- if [ ! -f /var/bigbluebutton/playback/presentation/2.0/LOGO-CSE-FINAL.png ]; then
- wget -O /var/bigbluebutton/playback/presentation/2.0/LOGO-CSE-FINAL.png https://digitalcse-001.nyc3.digitaloceanspaces.com/LOGO-CSE-FINAL.png
- fi
-
- cp /var/bigbluebutton/playback/presentation/2.0/LOGO-CSE-FINAL.png /var/bigbluebutton/playback/presentation/2.0/logo.png
- chmod 644 /var/bigbluebutton/playback/presentation/2.0/logo.png
- chown bigbluebutton:bigbluebutton /var/bigbluebutton/playback/presentation/2.0/logo.png
-
- if [ ! -f /var/www/bigbluebutton/client/guest-wait-digitalcse.html ]; then
- wget -O /var/www/bigbluebutton/client/guest-wait-digitalcse.html http://git.bluekitsune.com/bluekitsune-public/customfiles/raw/branch/master/guest-wait.html
- fi
-
- cp /var/www/bigbluebutton/client/guest-wait-digitalcse.html /var/www/bigbluebutton/client/guest-wait.html
-
- PUBLIC_IP=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address)
- echo "Fix for 1007 and 1020 - https://github.com/manishkatyan/bbb-optimize#fix-1007-and-1020-errors"
- xmlstarlet edit --inplace --update '//profile/settings/param[@name="ext-rtp-ip"]/@value' --value "\$\${external_rtp_ip}" /opt/freeswitch/etc/freeswitch/sip_profiles/external.xml
- xmlstarlet edit --inplace --update '//profile/settings/param[@name="ext-sip-ip"]/@value' --value "\$\${external_sip_ip}" /opt/freeswitch/etc/freeswitch/sip_profiles/external.xml
- xmlstarlet edit --inplace --update '//X-PRE-PROCESS[@cmd="set" and starts-with(@data, "external_rtp_ip=")]/@data' --value "external_rtp_ip=$PUBLIC_IP" /opt/freeswitch/etc/freeswitch/vars.xml
- xmlstarlet edit --inplace --update '//X-PRE-PROCESS[@cmd="set" and starts-with(@data, "external_sip_ip=")]/@data' --value "external_sip_ip=$PUBLIC_IP" /opt/freeswitch/etc/freeswitch/vars.xml
|