Skip to content

Commit 2df2809

Browse files
authored
Merge branch 'v3.0.x-release' into imagemagick-allow-xc
2 parents b306346 + 6420b0a commit 2df2809

File tree

1 file changed

+42
-34
lines changed

1 file changed

+42
-34
lines changed

bbb-install.sh

Lines changed: 42 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ OPTIONS (install BigBlueButton):
6060
6161
-c <hostname>:<secret> Configure with external coturn server at <hostname> using <secret> (instead of built-in TURN server)
6262
63-
-m <link_path> Create a Symbolic link from /var/bigbluebutton to <link_path>
63+
-m <link_path> Create a Symbolic link from /var/bigbluebutton to <link_path>
6464
6565
-p <host>[:<port>] Use apt-get proxy at <host> (default port 3142)
6666
-r <host> Use alternative apt repository (such as packages-eu.bigbluebutton.org)
@@ -143,7 +143,7 @@ main() {
143143

144144
s)
145145
HOST=$OPTARG
146-
if [ "$HOST" == "bbb.example.com" ]; then
146+
if [ "$HOST" == "bbb.example.com" ]; then
147147
err "You must specify a valid hostname (not the hostname given in the docs)."
148148
fi
149149
;;
@@ -152,7 +152,7 @@ main() {
152152
;;
153153
e)
154154
EMAIL=$OPTARG
155-
if [ "$EMAIL" == "[email protected]" ]; then
155+
if [ "$EMAIL" == "[email protected]" ]; then
156156
err "You must specify a valid email address (not the email in the docs)."
157157
fi
158158
;;
@@ -312,7 +312,7 @@ main() {
312312
install_docker # needed for bbb-libreoffice-docker
313313
need_pkg ruby
314314

315-
BBB_WEB_ETC_CONFIG=/etc/bigbluebutton/bbb-web.properties # Override file for local settings
315+
BBB_WEB_ETC_CONFIG=/etc/bigbluebutton/bbb-web.properties # Override file for local settings
316316

317317
need_pkg openjdk-17-jre
318318
update-java-alternatives -s java-1.17.0-openjdk-amd64
@@ -371,7 +371,7 @@ main() {
371371
systemctl restart systemd-journald
372372

373373
if [ -n "$UFW" ]; then
374-
setup_ufw
374+
setup_ufw
375375
fi
376376

377377
if [ -n "$HOST" ]; then
@@ -416,7 +416,7 @@ main() {
416416
<!ATTLIST policy stealth NMTOKEN #IMPLIED>
417417
<!ATTLIST policy value CDATA #IMPLIED>
418418
]>
419-
<!--
419+
<!--
420420
Creating a security policy that fits your specific local environment
421421
before making use of ImageMagick is highly advised. You can find guidance on
422422
setting up this policy at https://imagemagick.org/script/security-policy.php,
@@ -600,7 +600,7 @@ get_IP() {
600600

601601

602602
local external_ip
603-
# Determine external IP
603+
# Determine external IP
604604
if grep -sqi ^ec2 /sys/devices/virtual/dmi/id/product_uuid; then
605605
# EC2
606606
external_ip=$(wget -qO- http://169.254.169.254/latest/meta-data/public-ipv4)
@@ -632,17 +632,17 @@ get_IP() {
632632
nc -l -p 443 > /dev/null 2>&1 &
633633
nc_PID=$!
634634
sleep 1
635-
635+
636636
# Check if we can reach the server through it's external IP address
637637
if nc -zvw3 "$external_ip" 443 > /dev/null 2>&1; then
638638
INTERNAL_IP=$IP
639639
IP=$external_ip
640-
echo
640+
echo
641641
echo " Detected this server has an internal/external IP address."
642-
echo
642+
echo
643643
echo " INTERNAL_IP: $INTERNAL_IP"
644644
echo " (external) IP: $IP"
645-
echo
645+
echo
646646
fi
647647

648648
kill $nc_PID > /dev/null 2>&1;
@@ -672,7 +672,7 @@ need_pkg() {
672672
}
673673

674674
need_ppa() {
675-
need_pkg software-properties-common
675+
need_pkg software-properties-common
676676
if [ ! -f "/etc/apt/sources.list.d/$1" ]; then
677677
LC_CTYPE=C.UTF-8 add-apt-repository -y "$2"
678678
fi
@@ -715,18 +715,18 @@ check_coturn() {
715715
if [ -z "$COTURN_HOST" ]; then err "-c option must contain <hostname>"; fi
716716
if [ -z "$COTURN_SECRET" ]; then err "-c option must contain <secret>"; fi
717717

718-
if [ "$COTURN_HOST" == "turn.example.com" ]; then
718+
if [ "$COTURN_HOST" == "turn.example.com" ]; then
719719
err "You must specify a valid hostname (not the example given in the docs)"
720720
fi
721-
if [ "$COTURN_SECRET" == "1234abcd" ]; then
721+
if [ "$COTURN_SECRET" == "1234abcd" ]; then
722722
err "You must specify a new password (not the example given in the docs)."
723723
fi
724724

725725
check_host "$COTURN_HOST"
726726
}
727727

728728
check_apache2() {
729-
if dpkg -l | grep -q apache2-bin; then
729+
if dpkg -l | grep -q apache2-bin; then
730730
echo "You must uninstall the Apache2 server first"
731731
if [ "$SKIP_APACHE_INSTALLED_CHECK" != true ]; then
732732
exit 1
@@ -792,8 +792,8 @@ check_nat() {
792792

793793
# If dummy NIC is not in dummy-nic.service (or the file does not exist), update/create it
794794
if ! grep -q "$IP" /lib/systemd/system/dummy-nic.service > /dev/null 2>&1; then
795-
if [ -f /lib/systemd/system/dummy-nic.service ]; then
796-
DAEMON_RELOAD=true;
795+
if [ -f /lib/systemd/system/dummy-nic.service ]; then
796+
DAEMON_RELOAD=true;
797797
fi
798798

799799
cat > /lib/systemd/system/dummy-nic.service << HERE
@@ -825,7 +825,7 @@ check_LimitNOFILE() {
825825

826826
if [ "$CPU" -ge 8 ]; then
827827
if [ -f /lib/systemd/system/bbb-web.service ]; then
828-
# Let's create an override file to increase the number of LimitNOFILE
828+
# Let's create an override file to increase the number of LimitNOFILE
829829
mkdir -p /etc/systemd/system/bbb-web.service.d/
830830
cat > /etc/systemd/system/bbb-web.service.d/override.conf << HERE
831831
[Service]
@@ -886,7 +886,8 @@ defaults
886886
887887
888888
frontend nginx_or_turn
889-
bind *:443,:::443 ssl crt /etc/haproxy/certbundle.pem ssl-min-ver TLSv1.2 alpn h2,http/1.1,stun.turn
889+
# Http2 is disabled, include h2 to the list if you want to enable it: h2,http/1.1,stun.turn
890+
bind *:443,:::443 ssl crt /etc/haproxy/certbundle.pem ssl-min-ver TLSv1.2 alpn http/1.1,stun.turn
890891
mode tcp
891892
option tcplog
892893
tcp-request content capture req.payload(0,1) len 1
@@ -1011,7 +1012,7 @@ install_greenlight_v3(){
10111012
if [ ! -s $GL3_DIR/.env ]; then
10121013
err "failed to create greenlight-v3 .env file - is docker running?"
10131014
fi
1014-
1015+
10151016
say "greenlight-v3 .env file was created"
10161017
fi
10171018

@@ -1397,7 +1398,7 @@ wait_lti_broker_start() {
13971398
echo -n .
13981399
sleep 3
13991400
if (( ++tries == 3 )); then
1400-
err "failed to register LTI framework apps due to reaching LTI broker waiting timeout - retry to resolve"
1401+
err "failed to register LTI framework apps due to reaching LTI broker waiting timeout - retry to resolve"
14011402
fi
14021403
done
14031404

@@ -1417,7 +1418,7 @@ wait_postgres_start() {
14171418
echo -n .
14181419
sleep 3
14191420
if (( ++tries == 3 )); then
1420-
err "failed to start Postgres due to reaching waiting timeout - retry to resolve"
1421+
err "failed to start Postgres due to reaching waiting timeout - retry to resolve"
14211422
fi
14221423
done
14231424

@@ -1618,8 +1619,12 @@ server {
16181619
# Depending on the ALPN value traffic is redirected to either port 82 (HTTP2,
16191620
# ALPN value h2) or 81 (HTTP 1.0 or HTTP 1.1, ALPN value http/1.1 or no value)
16201621
1621-
listen 127.0.0.1:82 http2 proxy_protocol;
1622-
listen [::1]:82 http2;
1622+
# Http2 is disabled, include http2 to the list if you want to enable it
1623+
# listen 127.0.0.1:82 http2 proxy_protocol;
1624+
# listen [::1]:82 http2;
1625+
1626+
listen 127.0.0.1:82 proxy_protocol;
1627+
listen [::1]:82;
16231628
listen 127.0.0.1:81 proxy_protocol;
16241629
listen [::1]:81;
16251630
server_name $HOST;
@@ -1672,8 +1677,12 @@ server {
16721677
}
16731678
16741679
server {
1675-
listen 443 ssl http2;
1676-
listen [::]:443 ssl http2;
1680+
# Http2 is disabled, include http2 to the list if you want to enable it
1681+
# listen 443 ssl http2;
1682+
# listen [::]:443 ssl http2;
1683+
1684+
listen 443 ssl;
1685+
listen [::]:443 ssl;
16771686
server_name $HOST;
16781687
16791688
ssl_certificate /etc/letsencrypt/live/$HOST/fullchain.pem;
@@ -1683,7 +1692,7 @@ server {
16831692
ssl_protocols TLSv1.2 TLSv1.3;
16841693
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
16851694
ssl_dhparam /etc/nginx/ssl/ffdhe2048.pem;
1686-
1695+
16871696
# HSTS (comment out to enable)
16881697
#add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
16891698
@@ -1735,7 +1744,7 @@ fi
17351744

17361745
# Configure rest of BigBlueButton Configuration for SSL
17371746
xmlstarlet edit --inplace --update '//param[@name="wss-binding"]/@value' --value "$IP:7443" /opt/freeswitch/conf/sip_profiles/external.xml
1738-
1747+
17391748
# shellcheck disable=SC1091
17401749
eval "$(source /etc/bigbluebutton/bigbluebutton-release && declare -p BIGBLUEBUTTON_RELEASE)"
17411750
if [[ $BIGBLUEBUTTON_RELEASE == 2.2.* ]] && [[ ${BIGBLUEBUTTON_RELEASE#*.*.} -lt 29 ]]; then
@@ -1753,7 +1762,7 @@ fi
17531762
fi
17541763

17551764
yq e -i '.playback_protocol = "https"' /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
1756-
chmod 644 /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
1765+
chmod 644 /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
17571766

17581767
# Update Greenlight (if installed) to use SSL
17591768
for gl_dir in ~/greenlight $GL3_DIR;do
@@ -1816,12 +1825,12 @@ configure_coturn() {
18161825
xsi:schemaLocation="http://www.springframework.org/schema/beans
18171826
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
18181827
1819-
<!--
1828+
<!--
18201829
We need turn0 for FireFox to workaround its limited ICE implementation.
18211830
This is UDP connection. Note that port 3478 must be open on this BigBlueButton
18221831
and reachable by the client.
18231832
1824-
Also, in 2.5, we previously defined turn:\$HOST:443?transport=tcp (not 'turns')
1833+
Also, in 2.5, we previously defined turn:\$HOST:443?transport=tcp (not 'turns')
18251834
to workaround a bug in Safari's handling of Let's Encrypt. This bug is now fixed
18261835
https://bugs.webkit.org/show_bug.cgi?id=219274, so we omit the 'turn' protocol over
18271836
port 443.
@@ -1836,7 +1845,7 @@ configure_coturn() {
18361845
<constructor-arg index="1" value="turns:$COTURN_HOST:443?transport=tcp"/>
18371846
<constructor-arg index="2" value="86400"/>
18381847
</bean>
1839-
1848+
18401849
<bean id="stunTurnService"
18411850
class="org.bigbluebutton.web.services.turn.StunTurnService">
18421851
<property name="stunServers">
@@ -1932,7 +1941,7 @@ HERE
19321941

19331942
# Eanble coturn to bind to port 443 with CAP_NET_BIND_SERVICE
19341943
mkdir -p /etc/systemd/system/coturn.service.d
1935-
rm -rf /etc/systemd/system/coturn.service.d/ansible.conf # Remove previous file
1944+
rm -rf /etc/systemd/system/coturn.service.d/ansible.conf # Remove previous file
19361945
cat > /etc/systemd/system/coturn.service.d/override.conf <<HERE
19371946
[Service]
19381947
LimitNOFILE=1048576
@@ -1963,4 +1972,3 @@ HERE
19631972
}
19641973

19651974
main "$@" || exit 1
1966-

0 commit comments

Comments
 (0)