Skip to content

Commit

Permalink
Check that the BigBlueButton nginx definition exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ffdixon committed May 12, 2021
1 parent 80ab108 commit 856c5da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bbb-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,9 @@ install_ssl() {
if [ ! -f /etc/letsencrypt/live/$HOST/fullchain.pem ]; then
rm -f /tmp/bigbluebutton.bak
if ! grep -q $HOST /etc/nginx/sites-available/bigbluebutton; then # make sure we can do the challenge
cp /etc/nginx/sites-available/bigbluebutton /tmp/bigbluebutton.bak
if [ -f /etc/nginx/sites-available/bigbluebutton ]; then
cp /etc/nginx/sites-available/bigbluebutton /tmp/bigbluebutton.bak
fi
cat <<HERE > /etc/nginx/sites-available/bigbluebutton
server_tokens off;
server {
Expand Down Expand Up @@ -868,7 +870,6 @@ HERE
if [ -z "$PROVIDED_CERTIFICATE" ]; then
if ! certbot --email $EMAIL --agree-tos --rsa-key-size 4096 -w /var/www/bigbluebutton-default/ \
-d $HOST --deploy-hook "systemctl restart nginx" $LETS_ENCRYPT_OPTIONS certonly; then
cp /tmp/bigbluebutton.bak /etc/nginx/sites-available/bigbluebutton
systemctl restart nginx
err "Let's Encrypt SSL request for $HOST did not succeed - exiting"
fi
Expand Down

0 comments on commit 856c5da

Please sign in to comment.