diff --git a/README.md b/README.md index 5726566..976f165 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Login into your clean server, clone git repository and run the installer, ``` git clone https://github.com/switnet-ltd/quick-jibri-installer cd quick-jibri-installer -sudo bash quick_jibri_installer.sh +bash quick-jibri-installer.sh ``` ### Add Jibri node @@ -76,14 +76,14 @@ Feel free to use our `test-jibri-env.sh` tool to find some details on your curre * JWT auth * None * Automatic Jibri nodes network sync ([see more](https://github.com/switnet-ltd/quick-jibri-installer/wiki/Setup-and-Jibri-Nodes)). -* (New) JVB2 nodes network. -* (New) JWT auth. -* (New) Rename Jibri folder with name room + date. +* JVB2 nodes network. +* JWT auth. +* Rename Jibri folder with name room + date. -## Tools (New) +## Tools * Jibri Environment Tester * Jibri Conf Upgrader (late 2020). -* (New) Selenium Grid via Docker +* Selenium Grid via Docker ## Optional custom changes * Optional default language @@ -91,7 +91,7 @@ Feel free to use our `test-jibri-env.sh` tool to find some details on your curre * Option to enable Welcome Page ### Modes -* (New) Custom High Performance config +* Custom High Performance config ## Custom changes * Start with video muted by default diff --git a/jitsi-updater.sh b/jitsi-updater.sh index 833be2d..52c537d 100644 --- a/jitsi-updater.sh +++ b/jitsi-updater.sh @@ -88,8 +88,7 @@ update_google_repo() { GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{printf "%.1f\n", $NF}')" upgrade_cd() { if [ ! -z "$GOOGL_VER_2D" ]; then - if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" && \ - [ "$GOOGL_VER_2D" = "$CHD_LTST_2D" ]; then + if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" ; then echo "Upgrading Chromedriver to Google Chromes version" wget -q https://chromedriver.storage.googleapis.com/"$CHD_LTST"/chromedriver_linux64.zip \ -O /tmp/chromedriver_linux64.zip @@ -97,8 +96,8 @@ if [ ! -z "$GOOGL_VER_2D" ]; then chown root:root "$CHDB" chmod 0755 "$CHDB" rm -rf /tpm/chromedriver_linux64.zip - printf "Current version: ${Green} "$($CHDB -v |awk '{print $2}'|awk '{printf "%.1f\n", $NF}')" ${Color_Off}\n" - else + printf "Current version: ${Green} "$($CHDB -v |awk '{print $2}'|awk '{printf "%.1f\n", $NF}')" ${Color_Off} (latest available)\n" + elif [ "$GOOGL_VER_2D" = "$CHD_LTST_2D" ]; then echo "No need to upgrade Chromedriver" printf "Current version: ${Green} $CHD_VER_2D ${Color_Off}\n" fi diff --git a/jm-bm.sh b/jm-bm.sh index ee37db3..ed14b90 100644 --- a/jm-bm.sh +++ b/jm-bm.sh @@ -4,7 +4,7 @@ # 2020 - SwITNet Ltd # GNU GPLv3 or later. -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]++')" CSS_FILE="/usr/share/jitsi-meet/css/all.css" TITLE_FILE="/usr/share/jitsi-meet/title.html" INT_CONF="/usr/share/jitsi-meet/interface_config.js" diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index cd27a91..1f0f593 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -38,10 +38,10 @@ echo -e '\n exit_if_not_installed jitsi-meet DISTRO_RELEASE="$(lsb_release -sc)" -DOMAIN=$(ls /etc/prosody/conf.d/ | grep -v localhost | awk -F'.cfg' '{print $1}' | awk '!NF || !seen[$0]++') -PHP_REPO=$(apt-cache policy | grep http | grep php | head -n 1 | awk '{print $2}' | cut -d "/" -f5) +DOMAIN="$(ls /etc/prosody/conf.d/ | awk -F'.cfg' '!/localhost/{print $1}' | awk '!NF || !seen[$0]++')" +PHP_REPO="$(apt-cache policy | awk '/http/&&/php/{print$2}' | awk -F "/" 'NR==1{print$5}')" PHPVER="7.4" -PSGVER="$(apt-cache madison postgresql | head -n1 | awk '{print $3}' | cut -d "+" -f1)" +PSGVER="$(apt-cache madison postgresql | awk -F '[|+]' 'NR==1{print $2}')" PHP_FPM_DIR="/etc/php/$PHPVER/fpm" PHP_INI="$PHP_FPM_DIR/php.ini" PHP_CONF="/etc/php/$PHPVER/fpm/pool.d/www.conf" diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index f782339..4d1aaa7 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -20,13 +20,13 @@ set -x fi # SYSTEM SETUP -JITSI_REPO=$(apt-cache policy | grep http | grep jitsi | grep stable | awk '{print $3}' | head -n 1 | cut -d "/" -f1) +JITSI_REPO=$(apt-cache policy | awk '/jitsi/&&/stable/{print$3}' | awk -F / 'NR==1{print$1}') 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" -GOOGLE_ACTIVE_REPO=$(apt-cache policy | grep http | grep chrome| awk '{print $3}' | head -n 1 | cut -d "/" -f2) -PROSODY_REPO=$(apt-cache policy | grep http | grep prosody| awk '{print $3}' | head -n 1 | cut -d "/" -f2) +GOOGLE_ACTIVE_REPO=$(apt-cache policy | awk '/chrome/{print$3}' | awk -F "/" 'NR==1{print$2}') +PROSODY_REPO=$(apt-cache policy | awk '/prosody/{print$3}' | awk -F "/" 'NR==1{print$2}') PUBLIC_IP="$(dig +short myip.opendns.com @resolver1.opendns.com)" CR=`echo $'\n> '` @@ -79,7 +79,7 @@ check_snd_driver() { echo -e "\n# Checking ALSA - Loopback module..." echo "snd-aloop" | tee -a /etc/modules modprobe snd-aloop -if [ "$(lsmod | grep snd_aloop | head -n 1 | cut -d " " -f1)" = "snd_aloop" ]; then +if [ "$(lsmod|awk '/snd_aloop/{print$1}'|awk 'NR==1')" = "snd_aloop" ]; then echo " #----------------------------------------------------------------------- # Audio driver seems - OK. @@ -409,7 +409,7 @@ echo ' ######################################################################## ' # MEET / JIBRI SETUP -DOMAIN=$(ls /etc/prosody/conf.d/ | awk -F'.cfg' '!/localhost/{print $1}' | awk '!NF || !seen[$0]++') +DOMAIN="$(ls /etc/prosody/conf.d/ | awk -F'.cfg' '!/localhost/{print $1}' | awk '!NF || !seen[$0]++')" WS_CONF="/etc/nginx/sites-enabled/$DOMAIN.conf" JB_AUTH_PASS="$(tr -dc "a-zA-Z0-9#*=" < /dev/urandom | fold -w 10 | head -n1)" JB_REC_PASS="$(tr -dc "a-zA-Z0-9#*=" < /dev/urandom | fold -w 10 | head -n1)" @@ -427,7 +427,7 @@ LE_RENEW_LOG="/var/log/letsencrypt/renew.log" MOD_LISTU="https://prosody.im/files/mod_listusers.lua" MOD_LIST_FILE="/usr/lib/prosody/modules/mod_listusers.lua" ENABLE_SA="yes" -CERTBOT_REPO=$(apt-cache policy | grep http | grep certbot | head -n 1 | awk '{print $2}' | cut -d "/" -f4) +CERTBOT_REPO="$(apt-cache policy | awk '/certbot/{print$2}' | awk -F '/' 'NR==1{print$4}')" CERTBOT_REL_FILE="http://ppa.launchpad.net/certbot/certbot/ubuntu/dists/$(lsb_release -sc)/Release" GC_SDK_REL_FILE="http://packages.cloud.google.com/apt/dists/cloud-sdk-$(lsb_release -sc)/Release" MJS_RAND_TAIL="$(tr -dc "a-zA-Z0-9" < /dev/urandom | fold -w 4 | head -n1)"