From c98effb638297fcf372267185221357be3f9a680 Mon Sep 17 00:00:00 2001 From: Brent Baccala Date: Tue, 5 Jan 2021 21:53:26 -0500 Subject: [PATCH 1/2] new usage for -r option: specify entire URL prefix with schema instead of just hostname --- bbb-install.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bbb-install.sh b/bbb-install.sh index 958122d..2cf5087 100644 --- a/bbb-install.sh +++ b/bbb-install.sh @@ -65,7 +65,7 @@ OPTIONS (install BigBlueButton): -m Create a Symbolic link from /var/bigbluebutton to -p Use apt-get proxy at - -r Use alternative apt repository (such as packages-eu.bigbluebutton.org) + -r Use alternative apt repository (such as https://packages-eu.bigbluebutton.org) -d Skip SSL certificates request (use provided certificates from mounted volume) -w Install UFW firewall (recommended) @@ -107,7 +107,7 @@ HERE main() { export DEBIAN_FRONTEND=noninteractive - PACKAGE_REPOSITORY=ubuntu.bigbluebutton.org + PACKAGE_REPOSITORY=https://ubuntu.bigbluebutton.org LETS_ENCRYPT_OPTIONS="--webroot --non-interactive" SOURCES_FETCHED=false @@ -129,6 +129,10 @@ main() { ;; r) PACKAGE_REPOSITORY=$OPTARG + # backwards compatibility with old usage that omitted URL scheme + if [ echo $PACKAGE_REPOSITORY | grep '^https?:' ]; then + PACKAGE_REPOSITORY=https://$PACKAGE_REPOSITORY + fi ;; e) EMAIL=$OPTARG @@ -529,13 +533,13 @@ need_ppa() { check_version() { if ! echo $1 | egrep -q "xenial|bionic"; then err "This script can only install BigBlueButton 2.0 (or later)"; fi DISTRO=$(echo $1 | sed 's/-.*//g') - if ! wget -qS --spider "https://$PACKAGE_REPOSITORY/$1/dists/bigbluebutton-$DISTRO/Release.gpg" > /dev/null 2>&1; then + if ! wget -qS --spider "$PACKAGE_REPOSITORY/$1/dists/bigbluebutton-$DISTRO/Release.gpg" > /dev/null 2>&1; then err "Unable to locate packages for $1 at $PACKAGE_REPOSITORY." fi check_root need_pkg apt-transport-https if ! apt-key list | grep -q "BigBlueButton apt-get"; then - wget https://$PACKAGE_REPOSITORY/repo/bigbluebutton.asc -O- | apt-key add - + wget $PACKAGE_REPOSITORY/repo/bigbluebutton.asc -O- | apt-key add - fi # Check if were upgrading from 2.0 (the ownership of /etc/bigbluebutton/nginx/web has changed from bbb-client to bbb-web) @@ -549,7 +553,7 @@ check_version() { fi fi - echo "deb https://$PACKAGE_REPOSITORY/$VERSION bigbluebutton-$DISTRO main" > /etc/apt/sources.list.d/bigbluebutton.list + echo "deb $PACKAGE_REPOSITORY/$VERSION bigbluebutton-$DISTRO main" > /etc/apt/sources.list.d/bigbluebutton.list } check_host() { From 2bd805f9d7cf47feec8af5e33d041e2db05eb53b Mon Sep 17 00:00:00 2001 From: Brent Baccala Date: Fri, 12 Feb 2021 13:16:38 -0500 Subject: [PATCH 2/2] fix typo in bash shell command --- bbb-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bbb-install.sh b/bbb-install.sh index 2cf5087..d8f4057 100644 --- a/bbb-install.sh +++ b/bbb-install.sh @@ -130,7 +130,7 @@ main() { r) PACKAGE_REPOSITORY=$OPTARG # backwards compatibility with old usage that omitted URL scheme - if [ echo $PACKAGE_REPOSITORY | grep '^https?:' ]; then + if echo $PACKAGE_REPOSITORY | grep -v -q '^https?:'; then PACKAGE_REPOSITORY=https://$PACKAGE_REPOSITORY fi ;;