From b5236c5b04b599e402e39070605c5d8b43b1fb4e Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 30 Apr 2020 20:32:59 -0500 Subject: [PATCH 01/21] beging work on timer --- quick_jibri_installer.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 9335655..762d67b 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -338,7 +338,7 @@ done #Enable static avatar while [[ "$ENABLE_SA" != "yes" && "$ENABLE_SA" != "no" ]] do -read -p "> 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 echo "Static avatar won't be enabled" elif [ "$ENABLE_SA" = "yes" ]; then @@ -667,12 +667,23 @@ fi sed -i "s|'videobackgroundblur', ||" $INT_CONF #Setup secure rooms +SRP_STR=$(grep -n "VirtualHost \"$DOMAIN\"" $PROSODY_FILE | head -n1 | cut -d ":" -f1) +SRP_END=$((SRP_STR + 10)) +sed -i "$SRP_STR,$SRP_END{s|authentication = \"anonymous\"|authentication = \"internal_plain\"|}" $PROSODY_FILE + cat << P_SR >> $PROSODY_FILE -VirtualHost "$DOMAIN" - authentication = "internal_plain" VirtualHost "guest.$DOMAIN" authentication = "anonymous" + + speakerstats_component = "speakerstats.$DOMAIN" + conference_duration_component = "conferenceduration.$DOMAIN" + + modules_enabled = { + "muc_size"; + "speakerstats"; + "conference_duration"; + } c2s_require_encryption = false P_SR #Secure room initial user From 8e922adbea0fbd6968e756cb9821ea996ca3c277 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 30 Apr 2020 23:51:48 -0500 Subject: [PATCH 02/21] change repsoitory --- quick_jibri_installer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 762d67b..60420c3 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -138,10 +138,10 @@ read -n 1 -s -r -p "Press any key to continue..."$'\n' fi # Jitsi-Meet Repo echo "Add Jitsi key" -if [ "$JITSI_STBL_REPO" = "stable" ]; then +if [ "$JITSI_STBL_REPO" = "unstable" ]; then echo "Jitsi stable repository already installed" else - echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list + echo 'deb https://download.jitsi.org unstable/' > /etc/apt/sources.list.d/jitsi-unstable.list wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add - fi From a4b466adedaa9852d5f3b9e5d2900c3a0a9a3ac6 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Sat, 2 May 2020 19:21:53 -0500 Subject: [PATCH 03/21] Tune jitsi turn proxy for nextcloud --- quick_jibri_installer.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 60420c3..7a957fd 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -20,12 +20,13 @@ set -x fi # SYSTEM SETUP -JITSI_STBL_REPO=$(apt-cache policy | grep http | grep jitsi | grep stable | awk '{print $3}' | head -n 1 | cut -d "/" -f 1) -CERTBOT_REPO=$(apt-cache policy | grep http | grep certbot | head -n 1 | awk '{print $2}' | cut -d "/" -f 4) +JITSI_UNSTBL_REPO=$(apt-cache policy | grep http | grep jitsi | grep unstable | awk '{print $3}' | head -n 1 | cut -d "/" -f1) +CERTBOT_REPO=$(apt-cache policy | grep http | grep certbot | head -n 1 | awk '{print $2}' | cut -d "/" -f4) APACHE_2=$(dpkg-query -W -f='${Status}' apache2 2>/dev/null | grep -c "ok installed") NGINX=$(dpkg-query -W -f='${Status}' nginx 2>/dev/null | grep -c "ok installed") DIST=$(lsb_release -sc) GOOGL_REPO="/etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list" +PROSODY_REPO=$(apt-cache policy | grep http | grep prosody| awk '{print $3}' | head -n 1 | cut -d "/" -f2) if [ $DIST = flidas ]; then DIST="xenial" @@ -136,9 +137,17 @@ echo "$(lsb_release -sc), even when it's compatible and functional. We suggest to use the next (LTS) release, for longer support and security reasons." read -n 1 -s -r -p "Press any key to continue..."$'\n' fi +#Prosody repository +echo "Add Jitsi key" +if [ "$PROSODY_REPO" = "main" ]; then + echo "Prosody repository already installed" +else + echo "deb http://packages.prosody.im/debian $(lsb_release -sc) main" > /etc/apt/sources.list.d/prosody.list + wget -qO - https://prosody.im/files/prosody-debian-packages.key | apt-key add - +fi # Jitsi-Meet Repo echo "Add Jitsi key" -if [ "$JITSI_STBL_REPO" = "unstable" ]; then +if [ "$JITSI_UNSTBL_REPO" = "unstable" ]; then echo "Jitsi stable repository already installed" else echo 'deb https://download.jitsi.org unstable/' > /etc/apt/sources.list.d/jitsi-unstable.list From 176b82271d357d5b0f327acf1b3c117c3ad97466 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Sun, 3 May 2020 07:59:25 -0500 Subject: [PATCH 04/21] prevent adding if not necessary --- jra_nextcloud.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index 35917d8..59002a7 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -48,6 +48,10 @@ NC_DB="nextcloud_db" NC_DB_PASSWD="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)" DIR_RECORD="$(grep -nr RECORDING /home/jibri/finalize_recording.sh|head -n1|cut -d "=" -f2)" REDIS_CONF="/etc/redis/redis.conf" +JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf" +if [ -f $JITSI_MEET_PROXY ];then +PREAD_PROXY=$(grep -nr "preread_server_name" $JITSI_MEET_PROXY | cut -d ":" -f1) +fi exit_ifinstalled() { if [ "$(dpkg-query -W -f='${Status}' $1 2>/dev/null | grep -c "ok installed")" == "1" ]; then echo " This instance already has $1 installed, exiting..." @@ -334,6 +338,15 @@ if [ "$ENABLE_HSTS" = "yes" ]; then sed -i "s|# add_header Strict-Transport-Security|add_header Strict-Transport-Security|g" $NC_NGINX_CONF fi +if [ "$DISTRO_RELEASE" = "bionic" ] && [ -z $PREAD_PROXY ]; then +echo " + 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 \ \ \ \ \ \ $DOMAIN web;" $JITSI_MEET_PROXY + sed -i "/server {/i \ \ \ \ \ \ $NC_DOMAIN web;" $JITSI_MEET_PROXY + sed -i "/server {/i \ \ }" $JITSI_MEET_PROXY +fi echo " Latest version to be installed: $STABLEVERSION From 25a6b2e0afac43b91edad25cc5905da408e6ed6d Mon Sep 17 00:00:00 2001 From: Ark74 Date: Tue, 5 May 2020 09:18:59 -0500 Subject: [PATCH 05/21] Fix comments --- quick_jibri_installer.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 7a957fd..9bc6f00 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -138,7 +138,7 @@ We suggest to use the next (LTS) release, for longer support and security reason read -n 1 -s -r -p "Press any key to continue..."$'\n' fi #Prosody repository -echo "Add Jitsi key" +echo "Add Prosody repo" if [ "$PROSODY_REPO" = "main" ]; then echo "Prosody repository already installed" else @@ -146,7 +146,7 @@ else wget -qO - https://prosody.im/files/prosody-debian-packages.key | apt-key add - fi # Jitsi-Meet Repo -echo "Add Jitsi key" +echo "Add Jitsi repo" if [ "$JITSI_UNSTBL_REPO" = "unstable" ]; then echo "Jitsi stable repository already installed" else @@ -251,7 +251,7 @@ echo '{ "CommandLineFlagSecurityWarningsEnabled": false }' > $GCMP_JSON echo ' ######################################################################## - Please Setup Your Instalation + Please Setup Your Installation ######################################################################## ' # MEET / JIBRI SETUP From 2dd120e416a0e5e0957cd345998998af1ba23b1c Mon Sep 17 00:00:00 2001 From: Ark74 Date: Fri, 8 May 2020 21:46:18 -0500 Subject: [PATCH 06/21] Set additional jibri node variables --- quick_jibri_installer.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 9bc6f00..98fcec5 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -20,7 +20,7 @@ set -x fi # SYSTEM SETUP -JITSI_UNSTBL_REPO=$(apt-cache policy | grep http | grep jitsi | grep unstable | awk '{print $3}' | head -n 1 | cut -d "/" -f1) +JITSI_REPO=$(apt-cache policy | grep http | grep jitsi | grep stable | awk '{print $3}' | head -n 1 | cut -d "/" -f1) CERTBOT_REPO=$(apt-cache policy | grep http | grep certbot | head -n 1 | awk '{print $2}' | cut -d "/" -f4) APACHE_2=$(dpkg-query -W -f='${Status}' apache2 2>/dev/null | grep -c "ok installed") NGINX=$(dpkg-query -W -f='${Status}' nginx 2>/dev/null | grep -c "ok installed") @@ -97,6 +97,10 @@ Adding cerbot (formerly letsencrypt) PPA repository for latest updates apt-get -yq2 dist-upgrade fi } +# sed limiters for add-jibri-node.sh variables +var_dlim() { + grep -n $1 add-jibri-node.sh|head -n1|cut -d ":" -f1 +} clear echo ' @@ -150,7 +154,7 @@ echo "Add Jitsi repo" if [ "$JITSI_UNSTBL_REPO" = "unstable" ]; then echo "Jitsi stable repository already installed" else - echo 'deb https://download.jitsi.org unstable/' > /etc/apt/sources.list.d/jitsi-unstable.list + echo 'deb http://download.jitsi.org unstable/' > /etc/apt/sources.list.d/jitsi-unstable.list wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add - fi @@ -635,6 +639,17 @@ cat << CONF_JSON > $CONF_JSON } CONF_JSON +#Setting varibales for add-jibri-node.sh +sed -i "s|MAIN_SRV_DIST=.*|MAIN_SRV_DIST=\"$DIST\"|" add-jibri-node.sh +sed -i "s|MAIN_SRV_REPO=.*|MAIN_SRV_REPO=\"$JITSI_REPO\"|" add-jibri-node.sh +sed -i "s|MAIN_SRV_DOMAIN=.*|MAIN_SRV_DOMAIN=\"$DOMAIN\"|" add-jibri-node.sh +sed -i "s|JB_NAME=.*|JB_NAME=\"$JB_NAME\"|" add-jibri-node.sh +sed -i "s|JibriBrewery=.*|JibriBrewery=\"$JibriBrewery\"|" add-jibri-node.sh +sed -i "s|JB_AUTH_PASS=.*|JB_AUTH_PASS=\"$JB_AUTH_PASS\"|" add-jibri-node.sh +sed -i "s|JB_REC_PASS=.*|JB_REC_PASS=\"$JB_REC_PASS\"|" add-jibri-node.sh +sed -i "$(var_dlim 0_LAST),$(var_dlim 1_LAST){s|LETS: .*|LETS: $(date -R)|}" add-jibri-node.sh +echo "Last file edition at: $(grep "LETS:" add-jibri-node.sh|head -n1|awk -F'LETS:' '{print$2}')" + #Tune webserver for Jitsi App control if [ -f $WS_CONF ]; then sed -i "/Anything that didn't match above/i \\\n" $WS_CONF From d2bd5bd6a05cbe7583c93a67520d00ccb89b345d Mon Sep 17 00:00:00 2001 From: Ark74 Date: Sun, 10 May 2020 06:47:38 -0500 Subject: [PATCH 07/21] Small fixes --- jm-bm.sh | 2 +- quick_jibri_installer.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jm-bm.sh b/jm-bm.sh index 2813d38..affc743 100644 --- a/jm-bm.sh +++ b/jm-bm.sh @@ -9,7 +9,7 @@ TITLE_FILE="/usr/share/jitsi-meet/title.html" INT_CONF="/usr/share/jitsi-meet/interface_config.js" BUNDLE_JS="/usr/share/jitsi-meet/libs/app.bundle.min.js" # -JM_IMG_PATH="/usr/share/jitsi-meet/images/" +JM_IMG_PATH="/usr/share/jitsi-meet/images" WTM2_PATH="$JM_IMG_PATH/watermark2.png" FICON_PATH="$JM_IMG_PATH/favicon2.ico" # diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 98fcec5..69dc4c5 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -604,7 +604,7 @@ chown jibri:jibri $REC_DIR chmod +x $REC_DIR ## JSON Config -cp $CONF_JSON $CONF_JSON.orig +cp $CONF_JSON ${CONF_JSON}.orig cat << CONF_JSON > $CONF_JSON { "recording_directory":"$DIR_RECORD", From 6737dc417091b8b26a0c0c9db52475055852f95e Mon Sep 17 00:00:00 2001 From: Ark74 Date: Sun, 10 May 2020 06:49:12 -0500 Subject: [PATCH 08/21] add Jibri Node Aggregator --- add-jibri-node.sh | 282 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 add-jibri-node.sh diff --git a/add-jibri-node.sh b/add-jibri-node.sh new file mode 100644 index 0000000..18388b5 --- /dev/null +++ b/add-jibri-node.sh @@ -0,0 +1,282 @@ +#!/bin/bash +# Jibri Node Aggregator +# SwITNet Ltd © - 2020, https://switnet.net/ +# GPLv3 or later. + +### 0_LAST EDITION TIME STAMP ### +# LETS: AUTOMATED_EDITION_TIME +### 1_LAST EDITION ### + +#Make sure the file name is the required one +if [ ! "$(basename $0)" = "add-jibri-node.sh" ]; then + echo "For most cases naming won't matter, for this one it does." + echo "Please use the original name for this script: \`add-jibri-node.sh', and run again." + exit +fi + +while getopts m: option +do + case "${option}" + in + m) MODE=${OPTARG};; + \?) echo "Usage: sudo ./add_jibri_node.sh [-m debug]" && exit;; + esac +done + +#DEBUG +if [ "$MODE" = "debug" ]; then +set -x +fi + +#Check admin rights +if ! [ "$(id -u)" = 0 ]; then + echo "You need to be root or have sudo privileges!" + exit 0 +fi + +### 0_VAR_DEF +MAIN_SRV_DIST=TBD +MAIN_SRV_REPO=TBD +MAIN_SRV_DOMAIN=TBD +JibriBrewery=TBD +JB_NAME=TBD +JB_AUTH_PASS=TBD +JB_REC_PASS=TBD +THIS_SRV_DIST=$(lsb_release -sc) +JITSI_REPO=$(apt-cache policy | grep http | grep jitsi | grep stable | awk '{print $3}' | head -n 1 | cut -d "/" -f1) +START=0 +LAST=TBD +CONF_JSON="/etc/jitsi/jibri/config.json" +DIR_RECORD="/var/jbrecord" +REC_DIR="/home/jibri/finalize_recording.sh" +CHD_VER="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)" +GOOGL_REPO="/etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list" +GCMP_JSON="/etc/opt/chrome/policies/managed/managed_policies.json" +### 1_VAR_DEF + +# sed limiters for add-jibri-node.sh variables +var_dlim() { + grep -n $1 add-jibri-node.sh|head -n1|cut -d ":" -f1 +} + +check_var() { + if [ -z "$2" ]; then + echo "$1 is not defined, please check. Exiting..." + exit + else + echo "$1 is set to: $2" + fi + } + +if [ -z "$LAST" ]; then + echo "There is an error on the LAST definition, please report." + exit +elif [ "$LAST" = "TBD" ]; then + ADDUP=$((START + 1)) +else + ADDUP=$((LAST + 1)) +fi + +#Check server and node OS +if [ ! "$THIS_SRV_DIST" = "$MAIN_SRV_DIST" ]; then + echo "Please use the same OS for the jibri setup on both servers." + echo "This server is based on: $THIS_SRV_DIST" + echo "The main server record claims is based on: $MAIN_SRV_DIST" + exit +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" + +# Jitsi-Meet Repo +echo "Add Jitsi repo" +if [ -z "$JITSI_REPO" ]; then + echo "deb http://download.jitsi.org $MAIN_SRV_REPO/" > /etc/apt/sources.list.d/jitsi-$MAIN_SRV_REPO.list + wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add - +elif [ ! "$JITSI_REPO" = "$MAIN_SRV_REPO" ]; then + echo "Main and node servers repository don't match, extiting.." + exit +elif [ "$JITSI_REPO" = "$MAIN_SRV_REPO" ]; then + echo "Main and node servers repository match, continuing..." +else + echo "Jitsi $JITSI_REPO repository already installed" +fi + +check_snd_driver() { +modprobe snd-aloop +echo "snd-aloop" >> /etc/modules +if [ "$(lsmod | grep snd_aloop | head -n 1 | cut -d " " -f1)" = "snd_aloop" ]; then + echo " +#----------------------------------------------------------------------- +# Audio driver seems - OK. +#-----------------------------------------------------------------------" +else + echo " +#----------------------------------------------------------------------- +# Your audio driver might not be able to load, once the installation +# is complete and server restarted, please run: \`lsmod | grep snd_aloop' +# to make sure it did. If not, any feedback for your setup is welcome. +#-----------------------------------------------------------------------" +read -n 1 -s -r -p "Press any key to continue..."$'\n' +fi +} + +# Requirements +echo "We'll start by installing system requirements this may take a while please be patient..." +apt-get update -q2 +apt-get dist-upgrade -yq2 + +apt-get -y install \ + bmon \ + curl \ + ffmpeg \ + git \ + htop \ + linux-image-generic-hwe-"$(lsb_release -r|awk '{print$2}')" \ + unzip \ + wget + +check_snd_driver + +echo " +#-------------------------------------------------- +# Install Jibri +#-------------------------------------------------- +" +apt-get -y install \ + jibri \ + openjdk-8-jre-headless + +echo "# Installing Google Chrome / ChromeDriver" +if [ -f $GOOGL_REPO ]; then + echo "Google repository already set." +else + echo "Installing Google Chrome Stable" + wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - + echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | tee $GOOGL_REPO +fi +apt-get -q2 update +apt-get install -y google-chrome-stable +rm -rf /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list + +if [ -f /usr/local/bin/chromedriver ]; then + echo "Chromedriver already installed." +else + echo "Installing Chromedriver" + wget -q https://chromedriver.storage.googleapis.com/$CHD_VER/chromedriver_linux64.zip -O /tmp/chromedriver_linux64.zip + unzip /tmp/chromedriver_linux64.zip -d /usr/local/bin/ + chown root:root /usr/local/bin/chromedriver + chmod 0755 /usr/local/bin/chromedriver + rm -rf /tpm/chromedriver_linux64.zip +fi + +echo " +Check Google Software Working... +" +/usr/bin/google-chrome --version +/usr/local/bin/chromedriver --version | awk '{print$1,$2}' + +echo ' +######################################################################## + Start Jibri configuration +######################################################################## +' +echo " +Remove Chrome warning... +" +mkdir -p /etc/opt/chrome/policies/managed +echo '{ "CommandLineFlagSecurityWarningsEnabled": false }' > $GCMP_JSON + +# Recording directory +if [ ! -d $DIR_RECORD ]; then +mkdir $DIR_RECORD +fi +chown -R jibri:jibri $DIR_RECORD + +cat << REC_DIR > $REC_DIR +#!/bin/bash + +RECORDINGS_DIR=$DIR_RECORD + +echo "This is a dummy finalize script" > /tmp/finalize.out +echo "The script was invoked with recordings directory $RECORDINGS_DIR." >> /tmp/finalize.out +echo "You should put any finalize logic (renaming, uploading to a service" >> /tmp/finalize.out +echo "or storage provider, etc.) in this script" >> /tmp/finalize.out + +chmod -R 770 \$RECORDINGS_DIR + +exit 0 +REC_DIR +chown jibri:jibri $REC_DIR +chmod +x $REC_DIR + +## JSON Config +cp $CONF_JSON ${CONF_JSON}.orig + +cat << CONF_JSON > $CONF_JSON +{ + "recording_directory":"$DIR_RECORD", + "finalize_recording_script_path": "$REC_DIR", + "xmpp_environments": [ + { + "name": "$JB_NAME", + "xmpp_server_hosts": [ + "$MAIN_SRV_DOMAIN" + ], + "xmpp_domain": "$MAIN_SRV_DOMAIN", + "control_login": { + "domain": "auth.$MAIN_SRV_DOMAIN", + "username": "jibri", + "password": "$JB_AUTH_PASS" + }, + "control_muc": { + "domain": "internal.auth.$MAIN_SRV_DOMAIN", + "room_name": "$JibriBrewery", + "nickname": "Live-$ADDUP" + }, + "call_login": { + "domain": "recorder.$MAIN_SRV_DOMAIN", + "username": "recorder", + "password": "$JB_REC_PASS" + }, + + "room_jid_domain_string_to_strip_from_start": "conference.", + "usage_timeout": "0" + } + ] +} +CONF_JSON + +echo "Writting last node number..." +sed -i "$(var_dlim 0_VAR),$(var_dlim 1_VAR){s|LAST=.*|LAST=$ADDUP|}" add-jibri-node.sh +sed -i "$(var_dlim 0_LAST),$(var_dlim 1_LAST){s|LETS: .*|LETS: $(date -R)|}" add-jibri-node.sh +echo "Last file edition at: $(grep "LETS:" add-jibri-node.sh|head -n1|awk -F'LETS:' '{print$2}')" + +echo "Start Jibri at system boot" +systemctl enable jibri + +echo " +######################################################################## + Node addition complete!! + for customized support: http://switnet.net +######################################################################## +" + +echo "Rebooting in..." +secs=$((15)) +while [ $secs -gt 0 ]; do + echo -ne "$secs\033[0K\r" + sleep 1 + : $((secs--)) +done +reboot From 259c6eeb896bca649786d77596a6c35be3bc541a Mon Sep 17 00:00:00 2001 From: Ark74 Date: Sun, 10 May 2020 07:41:39 -0500 Subject: [PATCH 09/21] Enable Jibri services --- add-jibri-node.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/add-jibri-node.sh b/add-jibri-node.sh index 18388b5..22ad407 100644 --- a/add-jibri-node.sh +++ b/add-jibri-node.sh @@ -262,8 +262,10 @@ sed -i "$(var_dlim 0_VAR),$(var_dlim 1_VAR){s|LAST=.*|LAST=$ADDUP|}" add-jibri-n sed -i "$(var_dlim 0_LAST),$(var_dlim 1_LAST){s|LETS: .*|LETS: $(date -R)|}" add-jibri-node.sh echo "Last file edition at: $(grep "LETS:" add-jibri-node.sh|head -n1|awk -F'LETS:' '{print$2}')" -echo "Start Jibri at system boot" +#Enable jibri services systemctl enable jibri +systemctl enable jibri-xorg +systemctl enable jibri-icewm echo " ######################################################################## From c0a8dd481a19333790dd58b0ddac110b3cbe3ef0 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 20 May 2020 13:48:54 -0500 Subject: [PATCH 10/21] Enable jibri services --- add-jibri-node.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/add-jibri-node.sh b/add-jibri-node.sh index 18388b5..22ad407 100644 --- a/add-jibri-node.sh +++ b/add-jibri-node.sh @@ -262,8 +262,10 @@ sed -i "$(var_dlim 0_VAR),$(var_dlim 1_VAR){s|LAST=.*|LAST=$ADDUP|}" add-jibri-n sed -i "$(var_dlim 0_LAST),$(var_dlim 1_LAST){s|LETS: .*|LETS: $(date -R)|}" add-jibri-node.sh echo "Last file edition at: $(grep "LETS:" add-jibri-node.sh|head -n1|awk -F'LETS:' '{print$2}')" -echo "Start Jibri at system boot" +#Enable jibri services systemctl enable jibri +systemctl enable jibri-xorg +systemctl enable jibri-icewm echo " ######################################################################## From 5cfbacbfd56966006b369fdd1444888032299e6b Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 20 May 2020 13:57:11 -0500 Subject: [PATCH 11/21] Dropbox no longer requirement for local recording Removing dropbox login for local recording, yay! --- README.md | 1 - quick_jibri_installer.sh | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 3e5f8de..f4f62fa 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ Bash installer for Jibri on **\*buntu LTS** based systems using **nginx** as def * Valid domain with DNS record, **mandatory** for SSL certs via Let's Encrypt. * Ports open for ACME (SSL) interaction & validation. * Minimum recommended for video recording: 8 GB RAM / 2 Cores. -* Dropbox developer App key & redirect url configured (if you choose to enable Dropbox upload). * Webcam ## Features diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 69dc4c5..7428bf7 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -309,16 +309,16 @@ elif [ $ENABLE_SSL = yes ]; then echo "SSL will be enabled." fi done -#Dropbox -while [[ $ENABLE_DB != yes && $ENABLE_DB != no ]] -do -read -p "> Do you want to setup the Dropbox feature now: (yes or no)"$'\n' -r ENABLE_DB -if [ $ENABLE_DB = no ]; then - echo "Dropbox won't be enable" -elif [ $ENABLE_DB = yes ]; then - read -p "Please set your Drobbox App key: "$'\n' -r DB_CID -fi -done +#Dropbox -- no longer requirement for localrecording +#while [[ $ENABLE_DB != yes && $ENABLE_DB != no ]] +#do +#read -p "> Do you want to setup the Dropbox feature now: (yes or no)"$'\n' -r ENABLE_DB +#if [ $ENABLE_DB = no ]; then +# echo "Dropbox won't be enable" +#elif [ $ENABLE_DB = yes ]; then +# read -p "Please set your Drobbox App key: "$'\n' -r DB_CID +#fi +#done #Brandless Mode while [[ $ENABLE_BLESSM != yes && $ENABLE_BLESSM != no ]] do From 8fd6a7ee541b1c7e429f3dafc3d6765b4a31adf1 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 20 May 2020 14:30:40 -0500 Subject: [PATCH 12/21] Unbrand localrecording (no longer dropbox login used by default) --- images/gnome_record.png | Bin 0 -> 2075 bytes jm-bm.sh | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 images/gnome_record.png diff --git a/images/gnome_record.png b/images/gnome_record.png new file mode 100644 index 0000000000000000000000000000000000000000..bf00e5f3933522d9ed1441f31c04f211bc93c16c GIT binary patch literal 2075 zcmV+$2;}#PP)$kD0Im$G+J{P2K`7$#21sosB%-Qh!`Qnm75`gC??&&>RP=ljl? zvkNO)(TY~Iq80rQODyyKQb0Ox6M&4*E1(H@fE%~VqU8V(KsV6+2yFWb+|@0_Z3dLk zx)AjcGa*dRY5m4W@TaHYG%y#3zSf6di!y2G`#F4XP>9D<`FyT_XsD}u&6KE&z);dS1P_YH&+|i`WL^1KYCCF>i-RZ!rid-E+KxM>+iq*hCO@IneJ}< z$w?YhQ-rpSa$NvqI*pOdk}Q`oSFgsMon?G<)U8cV|KpWR=8@y8R{izt*|XDMCP3)` z+_v2?elxUpZ?-TvD4qA;$E#G3rb&9!CXxdK7?}*p_X+3b@Fpf`Oih8-bX|Wvna!J- znV3-HCr>&bf4k7ML=6z;qeYxiyd zbfbZ8G*Cf+_I*?k5YEhCpE`we<_riycE=6^Df#%#H{B1{u6^XpjvcSQ^wLX{S7XMw zO7oc?z)iza{(kfDaL$;W#U33cyLBrA_uo&~>ebL}qJ1A71QCGmqnk~1qX9s&RHAF` zT7s!5yh;Vrvgp0>#-tt_yFDzGj&B(msg910I{yg(0Sx?1h{Hp>cMql#2~j_Firk(( z6h=lssfAIGjVs@e&iVc#C;+ourdh4hICqXzu}G%3H<3Jb>Z|VX@L%q@XU3We!nJrt8 zU0paId_cZfG^})baPY0SzR}m$H`uAEjsb>-hDuwtJ~+62yXAiL5h9U@%-i-t)M|va z8me{N2BqqCLf0j9-FYA#hL~&DqQemHlTTQ)VMEqBapEV1LSX|P&d-hjcJ11g`L1nm z>$0rAlx5L4f1cF(_2@91H>YeniuhPN4mb|DF1Rkbt<^0E$3dDVGL<5zR!L>En5LPx zPMo;u<(FUXTQ-1vK3~}6I3vY1Yq}a2E&$PF4BN}Zw$b(ae9(4G45J+fJP+-85rpd! zIu3|vu!Cxqo?_7q-+udR<#PGDPP`>L>6FXm^4*QbH*>{eBKY*v=wTNxk}Q=FQX+&v z3W3%dp%egGDQHC)qMJ=b7@~s!noUFyKoEfM&%f}RGc#EI{fSHC70 z3^8v!hR{-CB$N1_N7Axpfyu4G6?d_d4)~|ohzI3UX=XDnVSoHcJ3SlE-o8@Wm!|J@4oxwL@tL|VqPpY))vN+ z~;6ta~8O;Yyd(CT`HA6+do(IN+5FPDCJN`kVwKjks{o%Un4wg)Fus4%2^z`(+!S-l3-+DJF zr3jTmX-yb^4wXVF1-TrbJC3SqJ^ua4$;W};3L(Nye097Vjc<7D>o2_U%;aaE`Cb@e z6bexmuIxLX4P(iuFX{)#Y!)XBnXFd5y)VA_3~;Pd^H&8B8>^J|?R)*^Lx-L^TdDXC zVD$FRZzI~JwMNHFX6y5kn;~*JY^C_yaq7;r3?J{H20tmH^_ChgG3x;G8nM!eCW=2m`tKQaw2YcP>BReN@nVH zD%Gm5QmM~xJ$(4-RU;#>0w+72xYrEO1~Nn#?j3#f(Qj3refEb^>r~0IlD(E?n27`_ z(*&*Yg8;wLV5VLVFWPpXr1Wlh@WJ2hdh*FXV;IMT5P$!o9D@ z8UWS-WgrK1#b5hC4LA=>0O!9*xvXeKD_YTtR`h?Te*z714-EyY5DWkS002ovPDHLk FV1i+a@?8J` literal 0 HcmV?d00001 diff --git a/jm-bm.sh b/jm-bm.sh index affc743..40987b7 100644 --- a/jm-bm.sh +++ b/jm-bm.sh @@ -12,6 +12,7 @@ BUNDLE_JS="/usr/share/jitsi-meet/libs/app.bundle.min.js" JM_IMG_PATH="/usr/share/jitsi-meet/images" WTM2_PATH="$JM_IMG_PATH/watermark2.png" FICON_PATH="$JM_IMG_PATH/favicon2.ico" +REC_ICON_PATH="$JM_IMG_PATH/gnome_record.png" # APP_NAME="Conferences" MOVILE_APP_NAME="Jitsi Meet" @@ -36,13 +37,19 @@ if [ ! -f $FICON_PATH ]; then else echo "favicon2 file exists, skipping copying..." fi +#Local recording icon +if [ ! -f $REC_ICON_PATH ];then + cp images/gnome_record.png $REC_ICON_PATH +else + echo "recodring icon exists, skipping copying..." +fi #Custom / Remove icons sed -i "s|watermark.png|watermark2.png|g" $CSS_FILE sed -i "s|favicon.ico|favicon2.ico|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|jitsiLogo_square.png|gnome_record.png|g" $BUNDLE_JS #Disable logo and url if [ -z $(grep -nr ".leftwatermark{display:none" $CSS_FILE) ]; then sed -i "s|.leftwatermark{|.leftwatermark{display:none;|" $CSS_FILE From f67ba407ad35b4e427a9db6f3a146daaa0403a8f Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 3 Jun 2020 02:46:08 -0500 Subject: [PATCH 13/21] Prevent mandatory variables be empty --- jra_nextcloud.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index 59002a7..b546a58 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -14,9 +14,27 @@ echo ' ######################################################################## by Software, IT & Networks Ltd ' +while [[ -z "$NC_DOMAIN" ]] +do read -p "Please enter the domain to use for Nextcloud: " -r NC_DOMAIN +if [ -z "$NC_DOMAIN" ]; then + echo "-- This field is mandatory." +fi +done +while [[ -z "$NC_USER" ]] +do read -p "Nextcloud user: " -r NC_USER +if [ -z "$NC_USER" ]; then + echo "-- This field is mandatory." +fi +done +while [[ -z "$NC_PASS" ]] +do read -p "Nextcloud user password: " -r NC_PASS +if [ -z "$NC_PASS" ]; then + echo "-- This field is mandatory." +fi +done #Enable HSTS while [[ "$ENABLE_HSTS" != "yes" && "$ENABLE_HSTS" != "no" ]] do From 7517f2f4a0f50da635a16b540289a38eb348eb46 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 3 Jun 2020 04:52:36 -0500 Subject: [PATCH 14/21] Test jigasi loggin out Also ignore log file --- .gitignore | 1 + quick_jibri_installer.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e69de29..299a0c5 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +qj-installer.log diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 7428bf7..8ccbeec 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -761,12 +761,13 @@ if [ $ENABLE_NC_ACCESS = yes ]; then echo "Jigasi Transcription will be enabled." bash $PWD/jra_nextcloud.sh fi +} > >(tee -a qj-installer.log) 2> >(tee -a qj-installer.log >&2) #Jigasi Transcript if [ $ENABLE_TRANSCRIPT = yes ]; then echo "Jigasi Transcription will be enabled." bash $PWD/jigasi.sh fi - +{ #Prevent Jibri conecction issue sed -i "/127.0.0.1/a \\ 127.0.0.1 $DOMAIN" /etc/hosts From ab9e30ca1c6c6ff86b641ab82de7a43c1b86bffb Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 3 Jun 2020 05:19:35 -0500 Subject: [PATCH 15/21] Dirty fix for jigasi transcriber --- jigasi.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jigasi.sh b/jigasi.sh index ceb717e..d201cb2 100644 --- a/jigasi.sh +++ b/jigasi.sh @@ -208,6 +208,15 @@ sed -i "/xmpp.acc.ANONYMOUS_AUTH/ s|# ||" $JIG_SIP_PROP prosodyctl register transcript auth.$DOMAIN jigasi +#Temp fix Jigasi Transcript +if [ grep -x "sleep" /etc/init.d/jicofo ]; then + echo "Jicofo delay already present." + else + echo "Adding Jicofo delay..." + sed -i "/\/lib\/lsb\/init-functions/i sleep 20" /etc/init.d/jicofo + systemctl daemon-reload +fi + systemctl restart prosody \ jicofo \ jibri* \ From a095035271ad1f655561ca8561cad7e9245154a7 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 3 Jun 2020 06:13:06 -0500 Subject: [PATCH 16/21] Fix confitional grep option --- jigasi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jigasi.sh b/jigasi.sh index d201cb2..e6d0c1d 100644 --- a/jigasi.sh +++ b/jigasi.sh @@ -209,7 +209,7 @@ sed -i "/xmpp.acc.ANONYMOUS_AUTH/ s|# ||" $JIG_SIP_PROP prosodyctl register transcript auth.$DOMAIN jigasi #Temp fix Jigasi Transcript -if [ grep -x "sleep" /etc/init.d/jicofo ]; then +if grep -q "sleep" /etc/init.d/jicofo; then echo "Jicofo delay already present." else echo "Adding Jicofo delay..." From 90c506c2fe268d3ec2d31aadda229f3a924d2e04 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 3 Jun 2020 06:22:16 -0500 Subject: [PATCH 17/21] Prevent word split --- quick_jibri_installer.sh | 54 ++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 8ccbeec..180eeb6 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -290,22 +290,22 @@ do read -p "Set sysadmin email (this is a mandatory field):"$'\n' -r SYSADMIN_EMAIL done #Drop unsecure TLS -while [[ $DROP_TLS1 != yes && $DROP_TLS1 != no ]] +while [[ "$DROP_TLS1" != "yes" && "$DROP_TLS1" != "no" ]] do 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." -elif [ $DROP_TLS1 = yes ]; then +elif [ "$DROP_TLS1" = "yes" ]; then echo "TLSv1.0/1.1 will be dropped" fi done #SSL LE -while [[ $ENABLE_SSL != yes && $ENABLE_SSL != no ]] +while [[ "$ENABLE_SSL" != "yes" && "$ENABLE_SSL" != "no" ]] do read -p "> Do you want to setup LetsEncrypt with your domain: (yes or no)"$'\n' -r ENABLE_SSL -if [ $ENABLE_SSL = no ]; then +if [ "$ENABLE_SSL" = "no" ]; then echo "Please run letsencrypt.sh manually post-installation." -elif [ $ENABLE_SSL = yes ]; then +elif [ "$ENABLE_SSL" = "yes" ]; then echo "SSL will be enabled." fi done @@ -320,12 +320,12 @@ done #fi #done #Brandless Mode -while [[ $ENABLE_BLESSM != yes && $ENABLE_BLESSM != no ]] +while [[ "$ENABLE_BLESSM" != "yes" && "$ENABLE_BLESSM" != "no" ]] do 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." -elif [ $ENABLE_BLESSM = yes ]; then +elif [ "$ENABLE_BLESSM" = "yes" ]; then echo "Brandless mode will be set." fi done @@ -339,12 +339,12 @@ This must be a really small word to present one self. Some suggestions might be: yo (Spanish) | je (French) | ich (German)" read -p "Leave empty to use the default one (English): "$'\n' L10N_ME #Welcome Page -while [[ $ENABLE_WELCP != yes && $ENABLE_WELCP != no ]] +while [[ "$ENABLE_WELCP" != "yes" && "$ENABLE_WELCP" != "no" ]] do 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." -elif [ $ENABLE_WELCP = no ]; then +elif [ "$ENABLE_WELCP" = "no" ]; then echo "Welcome page will be enabled." fi done @@ -381,24 +381,24 @@ elif [ "$ENABLE_SC" = "yes" ]; then fi done #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 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 -if [ $ENABLE_NC_ACCESS = no ]; then +if [ "$ENABLE_NC_ACCESS" = "no" ]; then echo "JRA via Nextcloud won't be enabled." -elif [ $ENABLE_NC_ACCESS = yes ]; then +elif [ "$ENABLE_NC_ACCESS" = "yes" ]; then echo "JRA via Nextcloud will be enabled." fi done #Jigasi -while [[ $ENABLE_TRANSCRIPT != yes && $ENABLE_TRANSCRIPT != no ]] +while [[ "$ENABLE_TRANSCRIPT" != "yes" && "$ENABLE_TRANSCRIPT" != "no" ]] do 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 -if [ $ENABLE_TRANSCRIPT = no ]; then +if [ "$ENABLE_TRANSCRIPT" = "no" ]; then echo "Jigasi Transcription won't be enabled." -elif [ $ENABLE_TRANSCRIPT = yes ]; then +elif [ "$ENABLE_TRANSCRIPT" = "yes" ]; then echo "Jigasi Transcription will be enabled." fi done @@ -531,7 +531,7 @@ sed -i "s|// liveStreamingEnabled: false,|liveStreamingEnabled: true,\\ hiddenDomain: \'recorder.$DOMAIN\',|" $MEET_CONF #Dropbox feature -if [ $ENABLE_DB = "yes" ]; then +if [ "$ENABLE_DB" = "yes" ]; then DB_STR=$(grep -n "dropbox:" $MEET_CONF | cut -d ":" -f1) DB_END=$((DB_STR + 10)) sed -i "$DB_STR,$DB_END{s|// dropbox: {|dropbox: {|}" $MEET_CONF @@ -540,7 +540,7 @@ sed -i "$DB_STR,$DB_END{s|// },|},|}" $MEET_CONF fi #LocalRecording -if [ $ENABLE_LAR = "yes" ]; then +if [ "$ENABLE_LAR" = "yes" ]; then echo "# Enabling local recording (audio only)." LR_STR=$(grep -n "// Local Recording" $MEET_CONF | cut -d ":" -f1) LR_END=$((LR_STR + 18)) @@ -674,11 +674,11 @@ if [ "$ENABLE_SA" = "yes" ] && [ -f $WS_CONF ]; then sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" $INT_CONF fi #nginx -tlsv1/1.1 -if [ $DROP_TLS1 = "yes" ] && [ $DIST = "bionic" ];then +if [ "$DROP_TLS1" = "yes" ] && [ "$DIST" = "bionic" ];then echo "Dropping TLSv1/1.1 in favor of v1.3" sed -i "s|TLSv1 TLSv1.1|TLSv1.3|" /etc/nginx/nginx.conf #sed -i "s|TLSv1 TLSv1.1|TLSv1.3|" $WS_CONF -elif [ $DROP_TLS1 = "yes" ] && [ ! $DIST = "bionic" ];then +elif [ "$DROP_TLS1" = "yes" ] && [ ! "$DIST" = "bionic" ];then echo "Only dropping TLSv1/1.1" sed -i "s|TLSv1 TLSv1.1||" /etc/nginx/nginx.conf #sed -i "s|TLSv1 TLSv1.1||" $WS_CONF @@ -727,9 +727,9 @@ sed -i "s|// startWithVideoMuted: false,|startWithVideoMuted: true,|" $MEET_CONF sed -i "s|// startAudioMuted: 10,|startAudioMuted: 1,|" $MEET_CONF #Disable/enable welcome page -if [ $ENABLE_WELCP = yes ]; then +if [ "$ENABLE_WELCP" = "yes" ]; then sed -i "s|.*enableWelcomePage:.*| enableWelcomePage: false,|" $MEET_CONF -elif [ $ENABLE_WELCP = no ]; then +elif [ "$ENABLE_WELCP" = "no" ]; then sed -i "s|.*enableWelcomePage:.*| enableWelcomePage: true,|" $MEET_CONF fi #Set displayname as not required since jibri can't set it up. @@ -751,19 +751,19 @@ else echo "No webserver found please report." fi #Brandless Mode -if [ $ENABLE_BLESSM = yes ]; then +if [ "$ENABLE_BLESSM" = "yes" ]; then echo "Custom brandless mode will be enabled." sed -i "s|ENABLE_BLESSM=.*|ENABLE_BLESSM=\"on\"|" jitsi-updater.sh bash $PWD/jm-bm.sh fi #JRA via Nextcloud -if [ $ENABLE_NC_ACCESS = yes ]; then +if [ "$ENABLE_NC_ACCESS" = "yes" ]; then echo "Jigasi Transcription will be enabled." bash $PWD/jra_nextcloud.sh fi } > >(tee -a qj-installer.log) 2> >(tee -a qj-installer.log >&2) #Jigasi Transcript -if [ $ENABLE_TRANSCRIPT = yes ]; then +if [ "$ENABLE_TRANSCRIPT" = "yes" ]; then echo "Jigasi Transcription will be enabled." bash $PWD/jigasi.sh fi From c8aa58a7f8bde0f779b97393273b0c51ca00924b Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 17 Jun 2020 17:06:51 -0500 Subject: [PATCH 18/21] Small comment --- jra_nextcloud.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index b546a58..adbf6fc 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -197,6 +197,7 @@ echo "Done! #nginx - configuration cat << NC_NGINX > $NC_NGINX_CONF +#nextcloud config upstream php-handler { #server 127.0.0.1:9000; server unix:/run/php/php${PHPVER}-fpm.sock; From ca9e7e09c27b619024292d5e4b5fc0729e40a546 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 17 Jun 2020 17:07:41 -0500 Subject: [PATCH 19/21] Add virtual modules for hwe kernel --- quick_jibri_installer.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 180eeb6..4baaaf5 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -171,6 +171,7 @@ apt-get -y install \ htop \ letsencrypt \ linux-image-generic-hwe-$(lsb_release -r|awk '{print$2}') \ + linux-modules-extra-virtual-hwe-$(lsb_release -r|awk '{print$2}') \ unzip \ wget From 64a974a62f31237b190ff1da13319fb9ace75b93 Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Mon, 29 Jun 2020 02:45:17 -0500 Subject: [PATCH 20/21] Add warning and choise to continue. --- quick_jibri_installer.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 4baaaf5..7f8ce4a 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -141,6 +141,42 @@ echo "$(lsb_release -sc), even when it's compatible and functional. We suggest to use the next (LTS) release, for longer support and security reasons." read -n 1 -s -r -p "Press any key to continue..."$'\n' fi +#Check resources +echo "Verifying System Resources:" +if [ "$(nproc --all)" -lt 4 ];then + echo "Warning: The system do not meet the minimum requirements for Jibri to run." + echo "Warning: We recommend 4 cores/threads for Jibri!" + CPU_MIN="N" +else + echo "CPU Cores/Threads: OK ($(nproc --all))" + CPU_MIN="Y" +fi +### Test RAM size (8GB min) ### +mem_available=$(grep MemTotal /proc/meminfo| grep -o '[0-9]\+') +if [ ${mem_available} -lt 7700000 ]; then + echo "Warning: The system do not meet the minimum requirements for Jibri to run." + echo "Warning: We recommend 8GB RAM for Jibri!" + MEM_MIN="N" +else + echo "Memory: OK ($((mem_available/1024)) MiB)" + MEM_MIN="Y" +fi +if [ $CPU_MIN="Y" ] && [ $MEM_MIN="Y" ];then + echo "All requirements seems meet!" + echo "We hope you have a nice recording/streaming session" +else + echo "Seems CPU/RAM requirements are NOT meet!" + echo "Even when you can use the videconference sessions, we advice to increase the resoruces in order to user Jibri." + while [[ "$CONTINUE_LOW_RES" != "yes" && "$CONTINUE_LOW_RES" != "no" ]] + do + read -p "> Do you want to continue?: (yes or no)"$'\n' -r CONTINUE_LOW_RES + if [ "$CONTINUE_LOW_RES" = "no" ]; then + echo "See you next time with more resources!..." + elif [ "$CONTINUE_LOW_RES" = "yes" ]; then + echo "Please keep in mind that trying to use Jibri with low resources might fail." + fi + done +fi #Prosody repository echo "Add Prosody repo" if [ "$PROSODY_REPO" = "main" ]; then From 21e094c0bb4f94db233777d20b931afa8d077eae Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Mon, 29 Jun 2020 14:26:03 -0500 Subject: [PATCH 21/21] Add exit option --- quick_jibri_installer.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 7f8ce4a..d9bb3ff 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -172,6 +172,7 @@ else read -p "> Do you want to continue?: (yes or no)"$'\n' -r CONTINUE_LOW_RES if [ "$CONTINUE_LOW_RES" = "no" ]; then echo "See you next time with more resources!..." + exit elif [ "$CONTINUE_LOW_RES" = "yes" ]; then echo "Please keep in mind that trying to use Jibri with low resources might fail." fi