- Improve add-jibri-node.sh variable check and logic.
- Let continue over simple DNS failing.
- Indenting change
This commit is contained in:
Luis Guzman 2021-04-12 10:55:14 -05:00 committed by GitHub
commit 85ca93d94b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 709 additions and 683 deletions

View File

@ -70,8 +70,8 @@ var_dlim() {
} }
check_var() { check_var() {
if [ -z "$2" ]; then if [ "$2" = "TBD" ]; then
echo -e "Check if variable $1 is set: \xE2\x9C\x96 \nExiting..." echo -e "Check if variable $1 is set: \xE2\x9C\x96"
exit exit
else else
echo -e "Check if variable $1 is set: \xE2\x9C\x94" echo -e "Check if variable $1 is set: \xE2\x9C\x94"
@ -87,6 +87,48 @@ else
ADDUP=$((LAST + 1)) ADDUP=$((LAST + 1))
fi fi
echo "
#-----------------------------------------------------------------------
# Checking initial necessary variables...
#-----------------------------------------------------------------------"
JMS_DATA=($MAIN_SRV_DIST \
$MAIN_SRV_REPO \
$MAIN_SRV_DOMAIN \
$JibriBrewery \
$JB_NAME \
$JB_AUTH_PASS \
$JB_REC_PASS \
$MJS_USER \
$MJS_USER_PASS)
JMS_EVAL=${JMS_DATA[0]}
for i in "${JMS_DATA[@]}"; do
if [[ "$JMS_EVAL" != "$i" ]]; then
ALL_TBD="no"
break
fi
done
if [ "$ALL_TBD" = "no" ];then
echo -e "Good, seems this is not a vanilla copy of add-jibri-node.sh,
let's check variables ...\n"
else
echo -e "You seem to be using a vanilla copy of the add-jibri-node.sh.
> Please use the content (or apply the changes) of add-jibri-node.sh from
the main Jitsi server installation folder, as it contains necessary data.\n"
exit
fi
check_var MAIN_SRV_DIST "$MAIN_SRV_DIST"
check_var MAIN_SRV_REPO "$MAIN_SRV_REPO"
check_var MAIN_SRV_DOMAIN "$MAIN_SRV_DOMAIN"
check_var JibriBrewery "$JibriBrewery"
check_var JB_NAME "$JB_NAME"
check_var JB_AUTH_PASS "$JB_AUTH_PASS"
check_var JB_REC_PASS "$JB_REC_PASS"
check_var MJS_USER "$MJS_USER"
check_var MJS_USER_PASS "$MJS_USER_PASS"
#Check server and node OS #Check server and node OS
if [ ! "$THIS_SRV_DIST" = "$MAIN_SRV_DIST" ]; then if [ ! "$THIS_SRV_DIST" = "$MAIN_SRV_DIST" ]; then
echo "Please use the same OS for the jibri setup on both servers." echo "Please use the same OS for the jibri setup on both servers."
@ -140,21 +182,6 @@ else
done done
fi fi
echo "
#-----------------------------------------------------------------------
# Checking initial necessary variables...
#-----------------------------------------------------------------------"
check_var MAIN_SRV_DIST "$MAIN_SRV_DIST"
check_var MAIN_SRV_REPO "$MAIN_SRV_REPO"
check_var MAIN_SRV_DOMAIN "$MAIN_SRV_DOMAIN"
check_var JibriBrewery "$JibriBrewery"
check_var JB_NAME "$JB_NAME"
check_var JB_AUTH_PASS "$JB_AUTH_PASS"
check_var JB_REC_PASS "$JB_REC_PASS"
check_var MJS_USER "$MJS_USER"
check_var MJS_USER_PASS "$MJS_USER_PASS"
# Rename hostname for each jibri node # Rename hostname for each jibri node
hostnamectl set-hostname "jbnode${ADDUP}.${MAIN_SRV_DOMAIN}" hostnamectl set-hostname "jbnode${ADDUP}.${MAIN_SRV_DOMAIN}"
sed -i "1i 127.0.0.1 jbnode${ADDUP}.${MAIN_SRV_DOMAIN}" /etc/hosts sed -i "1i 127.0.0.1 jbnode${ADDUP}.${MAIN_SRV_DOMAIN}" /etc/hosts
@ -224,7 +251,7 @@ HWE_VIR_MOD=$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr) 2>/de
if [ "$HWE_VIR_MOD" = "1" ]; then if [ "$HWE_VIR_MOD" = "1" ]; then
apt-get -y install \ apt-get -y install \
linux-image-generic-hwe-$(lsb_release -sr) linux-image-generic-hwe-$(lsb_release -sr)
else else
apt-get -y install \ apt-get -y install \
linux-image-generic \ linux-image-generic \
linux-modules-extra-$(uname -r) linux-modules-extra-$(uname -r)

View File

@ -42,7 +42,7 @@ cut -d "/" -f2
install_ifnot() { install_ifnot() {
if [ "$(dpkg-query -W -f='${Status}' $1 2>/dev/null | grep -c "ok installed")" == "1" ]; then if [ "$(dpkg-query -W -f='${Status}' $1 2>/dev/null | grep -c "ok installed")" == "1" ]; then
echo " $1 is installed, skipping..." echo " $1 is installed, skipping..."
else else
echo -e "\n---- Installing $1 ----" echo -e "\n---- Installing $1 ----"
apt-get -yq2 install $1 apt-get -yq2 install $1
fi fi

View File

@ -51,14 +51,18 @@ WS_CONF="/etc/nginx/sites-enabled/$DOMAIN.conf"
GRAFANA_PASS="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)" GRAFANA_PASS="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)"
# Min requirements # Min requirements
apt update && apt install -y gnupg2 curl wget jq apt-get update && \
apt-get install -y gnupg2 \
curl \
wget \
jq
echo " echo "
# Setup InfluxDB Packages # Setup InfluxDB Packages
" "
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
apt update && apt install influxdb -y apt-get update && apt-get install influxdb -y
run_service influxdb run_service influxdb
echo " echo "
@ -66,7 +70,7 @@ echo "
" "
curl -s https://packages.grafana.com/gpg.key | sudo apt-key add - curl -s https://packages.grafana.com/gpg.key | sudo apt-key add -
add-apt-repository "deb https://packages.grafana.com/oss/deb stable main" add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
apt update && apt install grafana -y apt-get update && apt-get install grafana -y
run_service grafana-server run_service grafana-server
echo " echo "
@ -74,7 +78,7 @@ echo "
" "
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
apt update && apt install telegraf -y apt-get update && apt-get install telegraf -y
mv /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.original mv /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.original
echo " echo "

View File

@ -35,7 +35,7 @@ DIST=$(lsb_release -sc)
CHECK_GC_REPO=$(apt-cache policy | grep http | grep cloud-sdk | head -n1 | awk '{print $3}' | awk -F '/' '{print $1}') CHECK_GC_REPO=$(apt-cache policy | grep http | grep cloud-sdk | head -n1 | awk '{print $3}' | awk -F '/' '{print $1}')
install_gc_repo() { install_gc_repo() {
if [ "$CHECK_GC_REPO" = "cloud-sdk-$DIST" ]; then if [ "$CHECK_GC_REPO" = "cloud-sdk-$DIST" ]; then
echo " echo "
Google Cloud SDK repository already on the system! Google Cloud SDK repository already on the system!
" "
@ -56,14 +56,14 @@ apt-get -y install google-cloud-sdk google-cloud-sdk-app-engine-java
echo "Please select one of the current options: echo "Please select one of the current options:
[1] I want to configure a new project, service account, billing and JSON credentials. [1] I want to configure a new project, service account, billing and JSON credentials.
[2] I already have one project configured and already have a JSON key file from Google" [2] I already have one project configured and already have a JSON key file from Google"
while [[ $SETUP_TYPE != 1 && $SETUP_TYPE != 2 ]] while [[ "$SETUP_TYPE" != "1" && "$SETUP_TYPE" != "2" ]]
do do
read -p "What option suits your setup?: (1 or 2)"$'\n' -r SETUP_TYPE read -p "What option suits your setup?: (1 or 2)"$'\n' -r SETUP_TYPE
if [ $SETUP_TYPE = 1 ]; then if [ "$SETUP_TYPE" = "1" ]; then
echo "We'll setup a GC Projects from scratch" echo "We'll setup a GC Projects from scratch"
elif [ $SETUP_TYPE = 2 ]; then elif [ "$SETUP_TYPE" = "2" ]; then
echo "We'll setup only the proect and JSON key." echo "We'll setup only the proect and JSON key."
fi fi
done done
if [ $SETUP_TYPE = 1 ]; then if [ $SETUP_TYPE = 1 ]; then
@ -84,10 +84,10 @@ while [ -z $PROJECT_GC_ID ]
do do
read -p "Enter the project name you just created for Jigasi Speech-to-Text"$'\n' -r GC_PROJECT_NAME read -p "Enter the project name you just created for Jigasi Speech-to-Text"$'\n' -r GC_PROJECT_NAME
if [ -z PROJECT_GC_ID ]; then if [ -z PROJECT_GC_ID ]; then
echo "Please check your project name, echo "Please check your project name,"
There is no project listed with the provided name: $GC_PROJECT_NAME" echo "There is no project listed with the provided name: $GC_PROJECT_NAME"
PROJECT_GC_ID=$(gcloud projects list | grep $GC_PROJECT_NAME | awk '{print$3}') PROJECT_GC_ID=$(gcloud projects list | grep $GC_PROJECT_NAME | awk '{print$3}')
fi fi
done done
echo "Your $GC_PROJECT_NAME ID's project is: $PROJECT_GC_ID" echo "Your $GC_PROJECT_NAME ID's project is: $PROJECT_GC_ID"
@ -101,8 +101,8 @@ while [[ $? -eq 1 ]]
do do
CHECK_BILLING="$(gcloud services enable speech.googleapis.com 2>/dev/null)" CHECK_BILLING="$(gcloud services enable speech.googleapis.com 2>/dev/null)"
if [[ $? -eq 1 ]]; then if [[ $? -eq 1 ]]; then
echo "Seems you haven't enabled billing for this project: $GC_PROJECT_NAME echo "Seems you haven't enabled billing for this project: $GC_PROJECT_NAME"
For that go to: https://console.developers.google.com/project/$PROJECT_GC_ID/settings exho " For that go to: https://console.developers.google.com/project/$PROJECT_GC_ID/settings
" "
read -p "Press Enter to continue" read -p "Press Enter to continue"
CHECK_BILLING="$(gcloud services enable speech.googleapis.com 2>/dev/null)" CHECK_BILLING="$(gcloud services enable speech.googleapis.com 2>/dev/null)"
@ -122,7 +122,7 @@ https://console.developers.google.com/apis/credentials?folder=&organizationId=&p
### End of new project configuration - Google SDK ### End of new project configuration - Google SDK
fi fi
if [ $SETUP_TYPE = 2 ]; then if [ "$SETUP_TYPE" = "2" ]; then
#Setup option 1 - Google Cloud SDK #Setup option 1 - Google Cloud SDK
echo "Once logged on Google Cloud SDK, please select the project that owns to the JSON key." echo "Once logged on Google Cloud SDK, please select the project that owns to the JSON key."
gcloud init gcloud init

View File

@ -26,7 +26,7 @@ ENABLE_BLESSM="TBD"
CHD_LTST="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)" CHD_LTST="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)"
CHD_LTST_2D="$(echo $CHD_LTST|cut -d "." -f 1,2)" CHD_LTST_2D="$(echo $CHD_LTST|cut -d "." -f 1,2)"
CHDB="$(whereis chromedriver | awk '{print$2}')" CHDB="$(whereis chromedriver | awk '{print$2}')"
DOMAIN="$(ls /etc/prosody/conf.d/ | grep -v localhost | awk -F'.cfg' '{print $1}' | awk '!NF || !seen[$0]++')" DOMAIN="$(ls /etc/prosody/conf.d|awk -F'.cfg' '!/localhost/{print $1}' | awk '!NF || !seen[$0]++')"
NC_DOMAIN="TBD" NC_DOMAIN="TBD"
JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf" JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf"
if [ -f $JITSI_MEET_PROXY ];then if [ -f $JITSI_MEET_PROXY ];then
@ -45,7 +45,7 @@ if [ -z $CHDB ]; then
echo "Seems no chromedriver installed" echo "Seems no chromedriver installed"
else else
CHD_VER_LOCAL="$($CHDB -v | awk '{print $2}')" CHD_VER_LOCAL="$($CHDB -v | awk '{print $2}')"
CHD_VER_2D="$(echo $CHD_VER_LOCAL|cut -d "." -f 1,2)" CHD_VER_2D="$(echo $CHD_VER_LOCAL|awk '{printf "%.1f\n", $NF}')"
fi fi
# True if $1 is greater than $2 # True if $1 is greater than $2
@ -85,19 +85,19 @@ update_google_repo() {
echo "No Google repository found" echo "No Google repository found"
fi fi
} }
GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{print$3}'|cut -d "." -f 1,2)" GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{printf "%.1f\n", $NF}')"
upgrade_cd() { upgrade_cd() {
if [ ! -z $GOOGL_VER_2D ]; then if [ ! -z "$GOOGL_VER_2D" ]; then
if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" && \ if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" && \
[ "$GOOGL_VER_2D" = "$CHD_LTST_2D" ]; then [ "$GOOGL_VER_2D" = "$CHD_LTST_2D" ]; then
echo "Upgrading Chromedriver to Google Chromes version" echo "Upgrading Chromedriver to Google Chromes version"
wget -q https://chromedriver.storage.googleapis.com/$CHD_LTST/chromedriver_linux64.zip \ wget -q https://chromedriver.storage.googleapis.com/"$CHD_LTST"/chromedriver_linux64.zip \
-O /tmp/chromedriver_linux64.zip -O /tmp/chromedriver_linux64.zip
unzip -o /tmp/chromedriver_linux64.zip -d /usr/local/bin/ unzip -o /tmp/chromedriver_linux64.zip -d /usr/local/bin/
chown root:root $CHDB chown root:root "$CHDB"
chmod 0755 $CHDB chmod 0755 "$CHDB"
rm -rf /tpm/chromedriver_linux64.zip rm -rf /tpm/chromedriver_linux64.zip
printf "Current version: ${Green} "$($CHDB -v | awk '{print $2}'|cut -d "." -f 1,2)" ${Color_Off}\n" printf "Current version: ${Green} "$($CHDB -v |awk '{print $2}'|awk '{printf "%.1f\n", $NF}')" ${Color_Off}\n"
else else
echo "No need to upgrade Chromedriver" echo "No need to upgrade Chromedriver"
printf "Current version: ${Green} $CHD_VER_2D ${Color_Off}\n" printf "Current version: ${Green} $CHD_VER_2D ${Color_Off}\n"
@ -154,7 +154,6 @@ else
sed -i "/RANDOM_AVATAR_URL_PREFIX/ s|false|\'http://$DOMAIN/avatar/\'|" $INT_CONF sed -i "/RANDOM_AVATAR_URL_PREFIX/ s|false|\'http://$DOMAIN/avatar/\'|" $INT_CONF
sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" $INT_CONF sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" $INT_CONF
fi fi
printf "${Purple}========== Setting Support Link ==========${Color_Off}\n" printf "${Purple}========== Setting Support Link ==========${Color_Off}\n"
if [[ -z $support ]]; then if [[ -z $support ]]; then
echo "Moving on..." echo "Moving on..."
@ -162,16 +161,13 @@ else
echo "Setting Support custom link" echo "Setting Support custom link"
sed -i "s|https://jitsi.org/live|$support|g" $INT_CONF sed -i "s|https://jitsi.org/live|$support|g" $INT_CONF
fi fi
printf "${Purple}========== Disable Localrecording ==========${Color_Off}\n" printf "${Purple}========== Disable Localrecording ==========${Color_Off}\n"
if [ "$LOC_REC" != "on" ]; then if [ "$LOC_REC" != "on" ]; then
echo "Removing localrecording..." echo "Removing localrecording..."
sed -i "s|'localrecording',||" $INT_CONF sed -i "s|'localrecording',||" $INT_CONF
fi fi
printf "${Purple}========== Disable Blur my background ==========${Color_Off}\n" printf "${Purple}========== Disable Blur my background ==========${Color_Off}\n"
sed -i "s|'videobackgroundblur', ||" $INT_CONF sed -i "s|'videobackgroundblur', ||" $INT_CONF
fi fi
if [ "$NC_DOMAIN" != "TBD" ]; then if [ "$NC_DOMAIN" != "TBD" ]; then
@ -188,14 +184,12 @@ printf "${Purple}========== Enable $NC_DOMAIN for sync client ==========${Color_
echo "$NC_DOMAIN seems to be on place, skipping..." echo "$NC_DOMAIN seems to be on place, skipping..."
fi fi
fi fi
restart_services restart_services
######################################################################## ########################################################################
# Brandless mode # # Brandless mode #
######################################################################## ########################################################################
if [ $ENABLE_BLESSM = on ]; then if [ "$ENABLE_BLESSM" = "on" ]; then
bash $PWD/jm-bm.sh bash $PWD/jm-bm.sh
fi fi
printf "${Blue}Script completed \o/! ${Color_Off}\n" printf "${Blue}Script completed \o/! ${Color_Off}\n"

View File

@ -28,38 +28,38 @@ echo '
#-------------------------------------------------- #--------------------------------------------------
' '
#Watermark #Watermark
if [ ! -f $WTM2_PATH ]; then if [ ! -f "$WTM2_PATH" ]; then
cp images/watermark2.png $WTM2_PATH cp images/watermark2.png "$WTM2_PATH"
else else
echo "watermark2 file exists, skipping copying..." echo "watermark2 file exists, skipping copying..."
fi fi
#Favicon #Favicon
if [ ! -f $FICON_PATH ]; then if [ ! -f "$FICON_PATH" ]; then
cp images/favicon2.ico $FICON_PATH cp images/favicon2.ico "$FICON_PATH"
else else
echo "favicon2 file exists, skipping copying..." echo "favicon2 file exists, skipping copying..."
fi fi
#Local recording icon #Local recording icon
if [ ! -f $REC_ICON_PATH ];then if [ ! -f "$REC_ICON_PATH" ];then
cp images/gnome_record.png $REC_ICON_PATH cp images/gnome_record.png "$REC_ICON_PATH"
else else
echo "recodring icon exists, skipping copying..." echo "recodring icon exists, skipping copying..."
fi fi
#Custom / Remove icons #Custom / Remove icons
sed -i "s|watermark.png|watermark2.png|g" $CSS_FILE sed -i "s|watermark.png|watermark2.png|g" "$CSS_FILE"
sed -i "s|favicon.ico|favicon2.ico|g" $TITLE_FILE sed -i "s|favicon.ico|favicon2.ico|g" "$TITLE_FILE"
sed -i "s|jitsilogo.png|watermark2.png|g" $TITLE_FILE sed -i "s|jitsilogo.png|watermark2.png|g" "$TITLE_FILE"
sed -i "s|logo-deep-linking.png|watermark2.png|g" $BUNDLE_JS sed -i "s|logo-deep-linking.png|watermark2.png|g" "$BUNDLE_JS"
sed -i "s|jitsiLogo_square.png|gnome_record.png|g" $BUNDLE_JS sed -i "s|jitsiLogo_square.png|gnome_record.png|g" "$BUNDLE_JS"
#Disable logo and url #Disable logo and url
if [ -z "$(grep -nr ".leftwatermark{display:none" "$CSS_FILE")" ]; then if [ -z "$(grep -nr ".leftwatermark{display:none" "$CSS_FILE")" ]; then
sed -i "s|.leftwatermark{|.leftwatermark{display:none;|" $CSS_FILE sed -i "s|.leftwatermark{|.leftwatermark{display:none;|" "$CSS_FILE"
fi fi
#Customize room title #Customize room title
sed -i "s|Jitsi Meet|$APP_NAME|g" $TITLE_FILE sed -i "s|Jitsi Meet|$APP_NAME|g" "$TITLE_FILE"
sed -i "s| powered by the Jitsi Videobridge||g" $TITLE_FILE sed -i "s| powered by the Jitsi Videobridge||g" "$TITLE_FILE"
sed -i "/appNotInstalled/ s|{{app}}|$MOVILE_APP_NAME|" /usr/share/jitsi-meet/lang/* sed -i "/appNotInstalled/ s|{{app}}|$MOVILE_APP_NAME|" /usr/share/jitsi-meet/lang/*
#Custom UI changes #Custom UI changes
@ -68,12 +68,12 @@ if [ -f "$INT_CONF_ETC" ]; then
else else
echo "This setup doesn't have a static interface_config.js, checking changes..." echo "This setup doesn't have a static interface_config.js, checking changes..."
echo -e "\nPlease note that brandless mode will also overwrite support links.\n" echo -e "\nPlease note that brandless mode will also overwrite support links.\n"
sed -i "21,32 s|Jitsi Meet|$APP_NAME|g" $INT_CONF sed -i "21,32 s|Jitsi Meet|$APP_NAME|g" "$INT_CONF"
sed -i "s|\([[:space:]]\)APP_NAME:.*| APP_NAME: \'$APP_NAME\',|" $INT_CONF sed -i "s|\([[:space:]]\)APP_NAME:.*| APP_NAME: \'$APP_NAME\',|" "$INT_CONF"
sed -i "s|Fellow Jitster|$PART_USER|g" $INT_CONF sed -i "s|Fellow Jitster|$PART_USER|g" "$INT_CONF"
sed -i "s|'me'|'$LOCAL_USER'|" $INT_CONF sed -i "s|'me'|'$LOCAL_USER'|" "$INT_CONF"
sed -i "s|LIVE_STREAMING_HELP_LINK: .*|LIVE_STREAMING_HELP_LINK: '#',|g" $INT_CONF sed -i "s|LIVE_STREAMING_HELP_LINK: .*|LIVE_STREAMING_HELP_LINK: '#',|g" "$INT_CONF"
sed -i "s|SUPPORT_URL: .*|SUPPORT_URL: '#',|g" $INT_CONF sed -i "s|SUPPORT_URL: .*|SUPPORT_URL: '#',|g" "$INT_CONF"
#Logo 2 #Logo 2
sed -i "s|watermark.png|watermark2.png|g" $INT_CONF sed -i "s|watermark.png|watermark2.png|g" "$INT_CONF"
fi fi

View File

@ -63,40 +63,39 @@ fi
while [[ -z "$NC_DOMAIN" ]] while [[ -z "$NC_DOMAIN" ]]
do do
read -p "Please enter the domain to use for Nextcloud: " -r NC_DOMAIN read -p "Please enter the domain to use for Nextcloud: " -r NC_DOMAIN
if [ -z "$NC_DOMAIN" ];then if [ -z "$NC_DOMAIN" ];then
echo "-- This field is mandatory." echo "-- This field is mandatory."
elif [ "$NC_DOMAIN" = "$DOMAIN" ]; then elif [ "$NC_DOMAIN" = "$DOMAIN" ]; then
echo "-- You can not use the same domain for both, Jitsi Meet and JRA via Nextcloud." echo "-- You can not use the same domain for both, Jitsi Meet and JRA via Nextcloud."
fi fi
done done
NC_NGINX_CONF="/etc/nginx/sites-available/$NC_DOMAIN.conf" NC_NGINX_CONF="/etc/nginx/sites-available/$NC_DOMAIN.conf"
while [[ -z "$NC_USER" ]] while [[ -z "$NC_USER" ]]
do do
read -p "Nextcloud user: " -r NC_USER read -p "Nextcloud user: " -r NC_USER
if [ -z "$NC_USER" ]; then if [ -z "$NC_USER" ]; then
echo "-- This field is mandatory." echo "-- This field is mandatory."
fi fi
done done
while [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 6 ] while [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 6 ]
do do
read -p "Nextcloud user password: " -r NC_PASS read -p "Nextcloud user password: " -r NC_PASS
if [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 6 ]; then
if [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 6 ]; then
echo -e "-- This field is mandatory. \nPlease make sure it's at least 6 caracters.\n" echo -e "-- This field is mandatory. \nPlease make sure it's at least 6 caracters.\n"
fi fi
done done
#Enable HSTS #Enable HSTS
while [[ "$ENABLE_HSTS" != "yes" && "$ENABLE_HSTS" != "no" ]] while [[ "$ENABLE_HSTS" != "yes" && "$ENABLE_HSTS" != "no" ]]
do do
read -p "> Do you want to enable HSTS for this domain?: (yes or no) read -p "> Do you want to enable HSTS for this domain?: (yes or no)
Be aware this option apply mid-term effects on the domain, choose \"no\" Be aware this option apply mid-term effects on the domain, choose \"no\"
in case you don't know what you are doing. More at https://hstspreload.org/"$'\n' -r ENABLE_HSTS in case you don't know what you are doing. More at https://hstspreload.org/"$'\n' -r ENABLE_HSTS
if [ "$ENABLE_HSTS" = "no" ]; then if [ "$ENABLE_HSTS" = "no" ]; then
echo "-- HSTS won't be enabled." echo "-- HSTS won't be enabled."
elif [ "$ENABLE_HSTS" = "yes" ]; then elif [ "$ENABLE_HSTS" = "yes" ]; then
echo "-- HSTS will be enabled." echo "-- HSTS will be enabled."
fi fi
done done
echo -e "\n# Check for jitsi-meet/jibri\n" echo -e "\n# Check for jitsi-meet/jibri\n"
@ -120,22 +119,22 @@ fi
install_ifnot() { install_ifnot() {
if [ "$(dpkg-query -W -f='${Status}' $1 2>/dev/null | grep -c "ok installed")" == "1" ]; then if [ "$(dpkg-query -W -f='${Status}' $1 2>/dev/null | grep -c "ok installed")" == "1" ]; then
echo " $1 is installed, skipping..." echo " $1 is installed, skipping..."
else else
echo -e "\n---- Installing $1 ----" echo -e "\n---- Installing $1 ----"
apt-get -yq2 install $1 apt-get -yq2 install $1
fi fi
} }
add_php74() { add_php74() {
if [ "$PHP_REPO" = "php" ]; then if [ "$PHP_REPO" = "php" ]; then
echo "PHP $PHPVER already installed" echo "PHP $PHPVER already installed"
apt-get -q2 update apt-get -q2 update
apt-get -yq2 dist-upgrade apt-get -yq2 dist-upgrade
else else
echo "# Adding Ondrej PHP $PHPVER PPA Repository" echo "# Adding Ondrej PHP $PHPVER PPA Repository"
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E5267A6C apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E5267A6C
echo "deb [arch=amd64] http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/php7x.list echo "deb [arch=amd64] http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/php7x.list
apt-get update -q2 apt-get update -q2
fi fi
} }
#Prevent root folder permission issues #Prevent root folder permission issues
cp $PWD/files/jra-nc-app-ef.json /tmp cp $PWD/files/jra-nc-app-ef.json /tmp
@ -383,11 +382,11 @@ nginx -t
systemctl restart nginx systemctl restart nginx
if [ "$ENABLE_HSTS" = "yes" ]; then if [ "$ENABLE_HSTS" = "yes" ]; then
sed -i "s|# add_header Strict-Transport-Security|add_header Strict-Transport-Security|g" $NC_NGINX_CONF sed -i "s|# add_header Strict-Transport-Security|add_header Strict-Transport-Security|g" $NC_NGINX_CONF
fi fi
if [ "$DISTRO_RELEASE" != "xenial" ] && [ ! -z $PREAD_PROXY ]; then if [ "$DISTRO_RELEASE" != "xenial" ] && [ ! -z "$PREAD_PROXY" ]; then
echo " echo "
Setting up Nextcloud domain on Jitsi Meet turn proxy Setting up Nextcloud domain on Jitsi Meet turn proxy
" "
sed -i "/server {/i \ \ map \$ssl_preread_server_name \$upstream {" $JITSI_MEET_PROXY sed -i "/server {/i \ \ map \$ssl_preread_server_name \$upstream {" $JITSI_MEET_PROXY

View File

@ -272,17 +272,21 @@ if [ "$LE_SSL" = "yes" ]; then
echo "Please try again." echo "Please try again."
fi fi
done done
#Simple DNS test #Simple DNS test
if [ "$PUBLIC_IP" = "$(dig -4 +short $JITSI_DOMAIN)" ]; then if [ "$PUBLIC_IP" = "$(dig -4 +short $JITSI_DOMAIN)" ]; then
echo "Server public IP & DNS record for $JITSI_DOMAIN seems to match, continuing... echo "Server public IP & DNS record for $JITSI_DOMAIN seems to match, continuing...
" "
else else
echo "Server public IP ($PUBLIC_IP) & DNS record for $JITSI_DOMAIN don't seem to match." echo "Server public IP ($PUBLIC_IP) & DNS record for $JITSI_DOMAIN don't seem to match."
echo "Please check your dns records are applied and updated. Exiting for now... echo " > Please check your dns records are applied and updated, otherwise components may fail."
" read -p " > Do you want to continue?: (yes or no)"$'\n' -r DNS_CONTINUE
if [ "$DNS_CONTINUE" = "yes" ]; then
echo " - We'll continue anyway..."
else
echo " - Exiting for now..."
exit exit
fi fi
fi
fi fi
# Requirements # Requirements
echo -e "\nWe'll start by installing system requirements this may take a while please be patient...\n" echo -e "\nWe'll start by installing system requirements this may take a while please be patient...\n"
@ -313,7 +317,7 @@ HWE_VIR_MOD=$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr) 2>/de
if [ "$HWE_VIR_MOD" = "1" ]; then if [ "$HWE_VIR_MOD" = "1" ]; then
apt-get -y install \ apt-get -y install \
linux-image-generic-hwe-$(lsb_release -sr) linux-image-generic-hwe-$(lsb_release -sr)
else else
apt-get -y install \ apt-get -y install \
linux-image-generic \ linux-image-generic \
linux-modules-extra-$(uname -r) linux-modules-extra-$(uname -r)
@ -346,7 +350,7 @@ echo "
" "
if [ "$(dpkg-query -W -f='${Status}' nodejs 2>/dev/null | grep -c "ok")" == "1" ]; then if [ "$(dpkg-query -W -f='${Status}' nodejs 2>/dev/null | grep -c "ok")" == "1" ]; then
echo "Nodejs is installed, skipping..." echo "Nodejs is installed, skipping..."
else else
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
apt-get install -yq2 nodejs apt-get install -yq2 nodejs
echo "Installing nodejs esprima package..." echo "Installing nodejs esprima package..."
@ -464,12 +468,12 @@ read -p "Leave empty to use the default one (English): "$'\n' L10N_ME
#Drop unsecure TLS #Drop unsecure TLS
while [[ "$DROP_TLS1" != "yes" && "$DROP_TLS1" != "no" ]] while [[ "$DROP_TLS1" != "yes" && "$DROP_TLS1" != "no" ]]
do do
read -p "> Do you want to drop support for unsecure protocols TLSv1.0/1.1 now: (yes or no)"$'\n' -r DROP_TLS1 read -p "> Do you want to drop support for unsecure protocols TLSv1.0/1.1 now: (yes or no)"$'\n' -r DROP_TLS1
if [ "$DROP_TLS1" = "no" ]; then if [ "$DROP_TLS1" = "no" ]; then
echo "TLSv1.0/1.1 will remain." echo "TLSv1.0/1.1 will remain."
elif [ "$DROP_TLS1" = "yes" ]; then elif [ "$DROP_TLS1" = "yes" ]; then
echo "TLSv1.0/1.1 will be dropped" echo "TLSv1.0/1.1 will be dropped"
fi fi
done done
#Dropbox -- no longer requirement for localrecording #Dropbox -- no longer requirement for localrecording
#while [[ $ENABLE_DB != yes && $ENABLE_DB != no ]] #while [[ $ENABLE_DB != yes && $ENABLE_DB != no ]]
@ -484,32 +488,32 @@ done
#Brandless Mode #Brandless Mode
while [[ "$ENABLE_BLESSM" != "yes" && "$ENABLE_BLESSM" != "no" ]] while [[ "$ENABLE_BLESSM" != "yes" && "$ENABLE_BLESSM" != "no" ]]
do do
read -p "> Do you want to install customized \"brandless mode\"?: (yes or no)"$'\n' -r ENABLE_BLESSM read -p "> Do you want to install customized \"brandless mode\"?: (yes or no)"$'\n' -r ENABLE_BLESSM
if [ "$ENABLE_BLESSM" = "no" ]; then if [ "$ENABLE_BLESSM" = "no" ]; then
echo "Brandless mode won't be set." echo "Brandless mode won't be set."
elif [ "$ENABLE_BLESSM" = "yes" ]; then elif [ "$ENABLE_BLESSM" = "yes" ]; then
echo "Brandless mode will be set." echo "Brandless mode will be set."
fi fi
done done
#Welcome Page #Welcome Page
while [[ "$ENABLE_WELCP" != "yes" && "$ENABLE_WELCP" != "no" ]] while [[ "$ENABLE_WELCP" != "yes" && "$ENABLE_WELCP" != "no" ]]
do do
read -p "> Do you want to disable the Welcome page: (yes or no)"$'\n' -r ENABLE_WELCP read -p "> Do you want to disable the Welcome page: (yes or no)"$'\n' -r ENABLE_WELCP
if [ "$ENABLE_WELCP" = "yes" ]; then if [ "$ENABLE_WELCP" = "yes" ]; then
echo "Welcome page will be disabled." echo "Welcome page will be disabled."
elif [ "$ENABLE_WELCP" = "no" ]; then elif [ "$ENABLE_WELCP" = "no" ]; then
echo "Welcome page will be enabled." echo "Welcome page will be enabled."
fi fi
done done
#Enable static avatar #Enable static avatar
while [[ "$ENABLE_SA" != "yes" && "$ENABLE_SA" != "no" ]] while [[ "$ENABLE_SA" != "yes" && "$ENABLE_SA" != "no" ]]
do do
read -p "> (Legacy) Do you want to enable static avatar?: (yes or no)"$'\n' -r ENABLE_SA read -p "> (Legacy) Do you want to enable static avatar?: (yes or no)"$'\n' -r ENABLE_SA
if [ "$ENABLE_SA" = "no" ]; then if [ "$ENABLE_SA" = "no" ]; then
echo "Static avatar won't be enabled" echo "Static avatar won't be enabled"
elif [ "$ENABLE_SA" = "yes" ]; then elif [ "$ENABLE_SA" = "yes" ]; then
echo "Static avatar will be enabled" echo "Static avatar will be enabled"
fi fi
done done
# #Enable local audio recording - disabling # #Enable local audio recording - disabling
#while [[ "$ENABLE_LAR" != "yes" && "$ENABLE_LAR" != "no" ]] #while [[ "$ENABLE_LAR" != "yes" && "$ENABLE_LAR" != "no" ]]
@ -563,13 +567,13 @@ done
#Jibri Records Access (JRA) via Nextcloud #Jibri Records Access (JRA) via Nextcloud
while [[ "$ENABLE_NC_ACCESS" != "yes" && "$ENABLE_NC_ACCESS" != "no" ]] while [[ "$ENABLE_NC_ACCESS" != "yes" && "$ENABLE_NC_ACCESS" != "no" ]]
do do
read -p "> Do you want to setup Jibri Records Access via Nextcloud: (yes or no) read -p "> Do you want to setup Jibri Records Access via Nextcloud: (yes or no)
( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_NC_ACCESS ( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_NC_ACCESS
if [ "$ENABLE_NC_ACCESS" = "no" ]; then if [ "$ENABLE_NC_ACCESS" = "no" ]; then
echo -e "-- JRA via Nextcloud won't be enabled.\n" echo -e "-- JRA via Nextcloud won't be enabled.\n"
elif [ "$ENABLE_NC_ACCESS" = "yes" ]; then elif [ "$ENABLE_NC_ACCESS" = "yes" ]; then
echo -e "-- JRA via Nextcloud will be enabled.\n" echo -e "-- JRA via Nextcloud will be enabled.\n"
fi fi
done done
#Jigasi #Jigasi
if [ "$(curl -s -o /dev/null -w "%{http_code}" $GC_SDK_REL_FILE )" == "404" ]; then if [ "$(curl -s -o /dev/null -w "%{http_code}" $GC_SDK_REL_FILE )" == "404" ]; then
@ -579,7 +583,7 @@ if [ "$(curl -s -o /dev/null -w "%{http_code}" $GC_SDK_REL_FILE )" == "404" ]; t
elif [ "$(curl -s -o /dev/null -w "%{http_code}" $GC_SDK_REL_FILE )" == "200" ]; then elif [ "$(curl -s -o /dev/null -w "%{http_code}" $GC_SDK_REL_FILE )" == "200" ]; then
while [[ "$ENABLE_TRANSCRIPT" != "yes" && "$ENABLE_TRANSCRIPT" != "no" ]] while [[ "$ENABLE_TRANSCRIPT" != "yes" && "$ENABLE_TRANSCRIPT" != "no" ]]
do do
read -p "> Do you want to setup Jigasi Transcription: (yes or no) read -p "> Do you want to setup Jigasi Transcription: (yes or no)
( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_TRANSCRIPT ( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_TRANSCRIPT
if [ "$ENABLE_TRANSCRIPT" = "no" ]; then if [ "$ENABLE_TRANSCRIPT" = "no" ]; then
echo -e "-- Jigasi Transcription won't be enabled.\n" echo -e "-- Jigasi Transcription won't be enabled.\n"
@ -661,7 +665,6 @@ if [ "$LE_SSL" = "yes" ]; then
elif [ "$(curl -s -o /dev/null -w "%{http_code}" $CERTBOT_REL_FILE )" == "404" ]; then elif [ "$(curl -s -o /dev/null -w "%{http_code}" $CERTBOT_REL_FILE )" == "404" ]; then
echo -e "\nCertbot PPA is not available for $(lsb_release -sc) just yet, it won't be installed...\n" echo -e "\nCertbot PPA is not available for $(lsb_release -sc) just yet, it won't be installed...\n"
fi fi
else else
echo "SSL setup will be skipped." echo "SSL setup will be skipped."
fi fi
@ -761,16 +764,15 @@ sed -i "s|// liveStreamingEnabled: false,|liveStreamingEnabled: true,\\
#LocalAudioRecording #LocalAudioRecording
if [ "$ENABLE_LAR" = "yes" ]; then if [ "$ENABLE_LAR" = "yes" ]; then
echo "# Enabling local recording (audio only)." echo "# Enabling local recording (audio only)."
LR_STR=$(grep -n "// Local Recording" $MEET_CONF | cut -d ":" -f1) LR_STR=$(grep -n "// Local Recording" $MEET_CONF | cut -d ":" -f1)
LR_END=$((LR_STR + 18)) LR_END=$((LR_STR + 18))
sed -i "$LR_STR,$LR_END{s|// localRecording: {|localRecording: {|}" $MEET_CONF sed -i "$LR_STR,$LR_END{s|// localRecording: {|localRecording: {|}" $MEET_CONF
sed -i "$LR_STR,$LR_END{s|// enabled: true,|enabled: true,|}" $MEET_CONF sed -i "$LR_STR,$LR_END{s|// enabled: true,|enabled: true,|}" $MEET_CONF
sed -i "$LR_STR,$LR_END{s|// format: 'flac'|format: 'flac'|}" $MEET_CONF sed -i "$LR_STR,$LR_END{s|// format: 'flac'|format: 'flac'|}" $MEET_CONF
sed -i "$LR_STR,$LR_END{s|// }|}|}" $MEET_CONF sed -i "$LR_STR,$LR_END{s|// }|}|}" $MEET_CONF
sed -i "s|'tileview'|'tileview', 'localrecording'|" $INT_CONF
sed -i "s|'tileview'|'tileview', 'localrecording'|" $INT_CONF sed -i "s|LOC_REC=.*|LOC_REC=\"on\"|" jitsi-updater.sh
sed -i "s|LOC_REC=.*|LOC_REC=\"on\"|" jitsi-updater.sh
fi fi
#Setup main language #Setup main language
@ -784,7 +786,7 @@ fi
# Recording directory # Recording directory
if [ ! -d $DIR_RECORD ]; then if [ ! -d $DIR_RECORD ]; then
mkdir $DIR_RECORD mkdir $DIR_RECORD
fi fi
chown -R jibri:jibri $DIR_RECORD chown -R jibri:jibri $DIR_RECORD
@ -996,7 +998,7 @@ elif [ "$DROP_TLS1" = "yes" ] && [ "$DIST" = "xenial" ];then
elif [ "$DROP_TLS1" = "no" ];then elif [ "$DROP_TLS1" = "no" ];then
echo "No TLSv1/1.1 dropping was done." echo "No TLSv1/1.1 dropping was done."
else else
echo "No condition meet, please report to echo "No condition meet, please report to
https://github.com/switnet-ltd/quick-jibri-installer/issues " https://github.com/switnet-ltd/quick-jibri-installer/issues "
fi fi
@ -1007,28 +1009,28 @@ sed -i "s|'videobackgroundblur', ||" $INT_CONF
###Setup secure rooms ###Setup secure rooms
if [ "$ENABLE_SC" = "yes" ]; then if [ "$ENABLE_SC" = "yes" ]; then
SRP_STR=$(grep -n "VirtualHost \"$DOMAIN\"" $PROSODY_FILE | head -n1 | cut -d ":" -f1) SRP_STR=$(grep -n "VirtualHost \"$DOMAIN\"" $PROSODY_FILE | head -n1 | cut -d ":" -f1)
SRP_END=$((SRP_STR + 10)) SRP_END=$((SRP_STR + 10))
sed -i "$SRP_STR,$SRP_END{s|authentication = \"anonymous\"|authentication = \"internal_plain\"|}" $PROSODY_FILE sed -i "$SRP_STR,$SRP_END{s|authentication = \"anonymous\"|authentication = \"internal_plain\"|}" $PROSODY_FILE
sed -i "s|// anonymousdomain: 'guest.example.com'|anonymousdomain: \'guest.$DOMAIN\'|" $MEET_CONF sed -i "s|// anonymousdomain: 'guest.example.com'|anonymousdomain: \'guest.$DOMAIN\'|" $MEET_CONF
#Secure room initial user #Secure room initial user
read -p "Set username for secure room moderator: "$'\n' -r SEC_ROOM_USER read -p "Set username for secure room moderator: "$'\n' -r SEC_ROOM_USER
read -p "Secure room moderator password: "$'\n' -r SEC_ROOM_PASS read -p "Secure room moderator password: "$'\n' -r SEC_ROOM_PASS
prosodyctl register $SEC_ROOM_USER $DOMAIN $SEC_ROOM_PASS prosodyctl register $SEC_ROOM_USER $DOMAIN $SEC_ROOM_PASS
echo -e "\nSecure rooms are being enabled..." echo -e "\nSecure rooms are being enabled..."
echo "You'll be able to login Secure Room chat with '${SEC_ROOM_USER}' \ echo "You'll be able to login Secure Room chat with '${SEC_ROOM_USER}' \
or '${SEC_ROOM_USER}@${DOMAIN}' using the password you just entered. or '${SEC_ROOM_USER}@${DOMAIN}' using the password you just entered.
If you have issues with the password refer to your sysadmin." If you have issues with the password refer to your sysadmin."
sed -i "s|#org.jitsi.jicofo.auth.URL=XMPP:|org.jitsi.jicofo.auth.URL=XMPP:|" $JICOFO_SIP sed -i "s|#org.jitsi.jicofo.auth.URL=XMPP:|org.jitsi.jicofo.auth.URL=XMPP:|" $JICOFO_SIP
sed -i "s|SEC_ROOM=.*|SEC_ROOM=\"on\"|" jm-bm.sh sed -i "s|SEC_ROOM=.*|SEC_ROOM=\"on\"|" jm-bm.sh
fi fi
###JWT ###JWT
if [ "$ENABLE_JWT" = "yes" ]; then if [ "$ENABLE_JWT" = "yes" ]; then
echo -e "\nJWT auth is being setup..." echo -e "\nJWT auth is being setup..."
bash $PWD/mode/jwt.sh bash $PWD/mode/jwt.sh
fi fi
#Guest allow #Guest allow
@ -1099,9 +1101,9 @@ sed -i "/Enable \/ disable simulcast support/i \/\/ End QJI" $MEET_CONF
echo -e "\n# Checking $MEET_CONF file for errors\n" echo -e "\n# Checking $MEET_CONF file for errors\n"
CHECKJS=$(esvalidate $MEET_CONF| cut -d ":" -f2) CHECKJS=$(esvalidate $MEET_CONF| cut -d ":" -f2)
if [[ -z "$CHECKJS" ]]; then if [[ -z "$CHECKJS" ]]; then
echo -e "\n# The $MEET_CONF configuration seems correct. =)\n" echo -e "\n# The $MEET_CONF configuration seems correct. =)\n"
else else
echo " echo "
Watch out!, there seems to be an issue on $MEET_CONF line: Watch out!, there seems to be an issue on $MEET_CONF line:
$CHECKJS $CHECKJS
Most of the times this is due upstream changes, please report to Most of the times this is due upstream changes, please report to
@ -1126,13 +1128,13 @@ fi
enable_letsencrypt enable_letsencrypt
if [ "$ENABLE_SC" = "yes" ];then if [ "$ENABLE_SC" = "yes" ];then
echo "Waiting prosody restart to continue configuration, 15s..." echo "Waiting prosody restart to continue configuration, 15s..."
wait_seconds 15 wait_seconds 15
#Move mucs when using secure rooms - https://community.jitsi.org/t/27752/112 #Move mucs when using secure rooms - https://community.jitsi.org/t/27752/112
#Change back - https://community.jitsi.org/t/64769/136 #Change back - https://community.jitsi.org/t/64769/136
#sed -i "s| lobby_muc = \"lobby.|-- lobby_muc = \"lobby.|" $PROSODY_FILE #sed -i "s| lobby_muc = \"lobby.|-- lobby_muc = \"lobby.|" $PROSODY_FILE
#sed -i "s| main_muc = \"conference.|-- main_muc = \"conference.|" $PROSODY_FILE #sed -i "s| main_muc = \"conference.|-- main_muc = \"conference.|" $PROSODY_FILE
sed -i "s| muc_lobby_whitelist = { \"recorder.*| muc_lobby_whitelist = { \"recorder.$DOMAIN\", \"auth.$DOMAIN\" }|" $PROSODY_FILE sed -i "s| muc_lobby_whitelist = { \"recorder.*| muc_lobby_whitelist = { \"recorder.$DOMAIN\", \"auth.$DOMAIN\" }|" $PROSODY_FILE
#EO_TF #EO_TF
fi fi
@ -1210,7 +1212,7 @@ if [ "$ENABLE_DOCKERPAD" = "yes" ]; then
fi fi
#Prevent Jibri conecction issue #Prevent Jibri conecction issue
if [ -z "$(grep -n $DOMAIN /etc/hosts)" ];then if [ -z "$(grep -n $DOMAIN /etc/hosts)" ];then
sed -i "/127.0.0.1/a \\ sed -i "/127.0.0.1/a \\
127.0.0.1 $DOMAIN" /etc/hosts 127.0.0.1 $DOMAIN" /etc/hosts
else else
echo "Local host already in place..." echo "Local host already in place..."

View File

@ -154,8 +154,8 @@ if [ -z $SND_AL_MODULE ]; then
please try rebooting.\nFor now wait 'til the end of the recommended kernel installation." please try rebooting.\nFor now wait 'til the end of the recommended kernel installation."
echo "# Check and Install HWE kernel if possible..." echo "# Check and Install HWE kernel if possible..."
if uname -r | grep -q aws;then if uname -r | grep -q aws;then
KNL_HWE="$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr)|head -n1|awk '{print$3}'|cut -d "." -f1-4)" KNL_HWE="$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr)|awk 'NR__1{print$3}'|cut -d "." -f1-4)"
KNL_MENU="$(awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg | grep generic | grep -v recovery | awk '{print$3,$4}'|grep $KNL_HWE)" KNL_MENU="$(awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg|awk '!/recovery/&&/generic/{print$3,$4}'|grep $KNL_HWE)"
if [ ! -z "$KNL_MENU" ];then if [ ! -z "$KNL_MENU" ];then
echo -e "\nSeems you are using an AWS kernel \xE2\x9C\x96 <== IMPORTANT! \nYou might consider modify your grub (/etc/default/grub) to use the following:" && \ echo -e "\nSeems you are using an AWS kernel \xE2\x9C\x96 <== IMPORTANT! \nYou might consider modify your grub (/etc/default/grub) to use the following:" && \
echo -e "\n > $KNL_MENU" echo -e "\n > $KNL_MENU"