From 869df7ceef29892ccc082848080a3c5ae434d592 Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Mon, 23 May 2022 23:17:39 -0500 Subject: [PATCH 01/17] 7.0.1 (#81) * Fix debug mode on triggered scripts. * Fix grep condition. --- jitsi-updater.sh | 6 +++++- jm-bm.sh | 2 +- quick_jibri_installer.sh | 12 ++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/jitsi-updater.sh b/jitsi-updater.sh index faefc4a..7b4196f 100644 --- a/jitsi-updater.sh +++ b/jitsi-updater.sh @@ -207,6 +207,10 @@ restart_services # Brandless mode # ######################################################################## if [ "$ENABLE_BLESSM" = "on" ]; then - bash "$PWD"/jm-bm.sh + if [ "$MODE" = "debug" ]; then + bash "$PWD"/jm-bm.sh -m debug + else + bash "$PWD"/jm-bm.sh + fi fi printwc "${Blue}" "Script completed \o/!\n" diff --git a/jm-bm.sh b/jm-bm.sh index d5bc4dc..39a6dca 100644 --- a/jm-bm.sh +++ b/jm-bm.sh @@ -67,7 +67,7 @@ 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 ! grep -nr ".leftwatermark{display:none" "$CSS_FILE" ; then +if ! grep -q ".leftwatermark{display:none" "$CSS_FILE" ; then sed -i "s|.leftwatermark{|.leftwatermark{display:none;|" "$CSS_FILE" fi diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 0aff27c..da32c76 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -1092,7 +1092,11 @@ sleep .1 ###JWT if [ "$ENABLE_JWT" = "yes" ]; then printf "\nJWT auth is being setup...\n" - bash "$PWD"/mode/jwt.sh + if [ "$MODE" = "debug" ]; then + bash "$PWD"/mode/jwt.sh -m debug + else + bash "$PWD"/mode/jwt.sh + fi fi sleep .1 #Guest allow @@ -1201,7 +1205,11 @@ fi 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 + if [ "$MODE" = "debug" ]; then + bash "$PWD"/jm-bm.sh -m debug + else + bash "$PWD"/jm-bm.sh + fi fi # Applying best practives for interface config.js -- 2.34.1 From 9926e5d5735ea91f87deb5b98ec4fff2041bbb8d Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Fri, 17 Jun 2022 16:36:15 -0500 Subject: [PATCH 02/17] 7.0.2 (#82) * Detect jibri node by jitsi-updater. --- jitsi-updater.sh | 58 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/jitsi-updater.sh b/jitsi-updater.sh index 7b4196f..3bee66a 100644 --- a/jitsi-updater.sh +++ b/jitsi-updater.sh @@ -20,6 +20,7 @@ fi Blue='\e[0;34m' Purple='\e[0;35m' +Red='\e[0;31m' Green='\e[0;32m' Yellow='\e[0;33m' Color_Off='\e[0m' @@ -40,10 +41,14 @@ support="https://switnet.net/support" apt_repo="/etc/apt/sources.list.d" ENABLE_BLESSM="TBD" 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="$(cut -d "." -f 1,2 <<< "$CHD_LTST")" CHDB="$(whereis chromedriver | awk '{print$2}')" +if [ -d /etc/prosody/conf.d/ ]; then DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua | \ awk -F'.cfg' '!/localhost/{print $1}' | xargs basename)" +else + echo -e "Seems no prosody is installed...\n > is this a jibri node?" +fi NC_DOMAIN="TBD" JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf" if [ -f "$JITSI_MEET_PROXY" ];then @@ -65,13 +70,13 @@ if [ -z "$CHDB" ]; then echo "Seems no chromedriver installed" else CHD_VER_LOCAL="$($CHDB -v | awk '{print $2}')" - CHD_VER_2D="$(echo "$CHD_VER_LOCAL"|awk '{printf "%.1f\n", $NF}')" + CHD_VER_2D="$(awk '{printf "%.1f\n", $NF}' <<< "$CHD_VER_LOCAL")" fi # True if $1 is greater than $2 version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; } -check_jibri() { +restart_jibri() { if [ "$(dpkg-query -W -f='${Status}' "jibri" 2>/dev/null | grep -c "ok installed")" == "1" ] then systemctl restart jibri @@ -86,7 +91,7 @@ fi restart_services() { systemctl restart jitsi-videobridge2 systemctl restart jicofo - check_jibri + restart_jibri systemctl restart prosody } @@ -105,7 +110,13 @@ update_google_repo() { echo "No Google repository found" fi } -GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{printf "%.1f\n", $NF}')" +printwc "${Purple}" "Checking for Google Chrome\n" +if [ -f /usr/bin/google-chrome ]; then + GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{printf "%.1f\n", $NF}')" +else + printwc "${Yellow}" " -> Seems there is no Google Chrome installed\n" + IS_GLG_CHRM="no" +fi upgrade_cd() { if [ -n "$GOOGL_VER_2D" ]; then if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" ; then @@ -139,6 +150,7 @@ if [ -f "$CHDB" ]; then upgrade_cd else printwc "${Yellow}" " -> Seems there is no Chromedriver installed\n" + IS_CHDB="no" fi } @@ -155,6 +167,21 @@ else echo "Please check your repositories, something is not right." exit 1 fi +check_if_installed(){ +if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")" == "1" ]; then + echo "1" +else + echo "0" +fi +} +check_for_jibri_node() { +if [ "$(check_if_installed jibri)" = 1 ] && \ + [ "$(check_if_installed jitsi-meet)" = 0 ] && \ + [ "$(check_if_installed prosody)" = 0 ]; then + printwc "${Green}" "\n::: This seems to be a jibri node :::\n" +JIBRI_NODE="yes" +fi +} # Any customization, image, name or link change for any purpose should # be documented here so new updates won't remove those changes. # We divide them on UI changes and branding changes, feel free to adapt @@ -165,13 +192,16 @@ fi ######################################################################## # User interface changes # ######################################################################## +#Check for jibri node +check_for_jibri_node +[ "$JIBRI_NODE" != yes ] && \ if [ -f "$INT_CONF_ETC" ]; then echo "Static interface_config.js exists, skipping modification..." else echo "This setup doesn't have a static interface_config.js, checking changes..." printwc "${Purple}" "========== Setting Static Avatar ==========\n" - if [[ -z "$AVATAR" ]]; then + if [ -z "$AVATAR" ]; then echo "Moving on..." else echo "Setting Static Avatar" @@ -179,7 +209,7 @@ else sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" "$INT_CONF" fi printwc "${Purple}" "========== Setting Support Link ==========\n" - if [[ -z "$support" ]]; then + if [ -z "$support" ]; then echo "Moving on..." else echo "Setting Support custom link" @@ -189,6 +219,7 @@ else sed -i "s|'videobackgroundblur', ||" "$INT_CONF" fi +[ "$JIBRI_NODE" != yes ] && \ if [ "$NC_DOMAIN" != "TBD" ]; then printwc "${Purple}" "========== Enable $NC_DOMAIN for sync client ==========\n" if [ -z "$PREAD_PROXY" ]; then @@ -201,8 +232,19 @@ printwc "${Purple}" "========== Enable $NC_DOMAIN for sync client ==========\n" echo "$NC_DOMAIN seems to be on place, skipping..." fi fi -restart_services +if [ "$JIBRI_NODE" = "yes" ]; then + restart_jibri +else + restart_services +fi +if [ "$JIBRI_NODE" = "yes" ] && \ + [ "$IS_CHDB" = "no" ] && \ + [ "$IS_GLG_CHRM" = "no" ];then +printwc "${Red}" "\nBeware: This jibri node seems to be missing important packages.\n" +echo " > Googe Chrome" +echo " > Chromedriver" +fi ######################################################################## # Brandless mode # ######################################################################## -- 2.34.1 From 8b20ae561cc80c365720838fcdbf7675ae1c28f7 Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Thu, 30 Jun 2022 09:57:12 -0500 Subject: [PATCH 03/17] 7.0.3 (#83) * jitsi-updater: fix condition to set turn config. * quick-jibri-installer: fix typo on path. --- jitsi-updater.sh | 2 +- quick_jibri_installer.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jitsi-updater.sh b/jitsi-updater.sh index 3bee66a..b1af3f4 100644 --- a/jitsi-updater.sh +++ b/jitsi-updater.sh @@ -222,7 +222,7 @@ fi [ "$JIBRI_NODE" != yes ] && \ if [ "$NC_DOMAIN" != "TBD" ]; then printwc "${Purple}" "========== Enable $NC_DOMAIN for sync client ==========\n" - if [ -z "$PREAD_PROXY" ]; then + if [ -f "$JITSI_MEET_PROXY" ] && [ -z "$PREAD_PROXY" ]; then printf "\n Setting up Nextcloud domain on Jitsi Meet turn proxy\n\n" sed -i "/server {/i \ \ map \$ssl_preread_server_name \$upstream {" "$JITSI_MEET_PROXY" sed -i "/server {/i \ \ \ \ \ \ $DOMAIN web;" "$JITSI_MEET_PROXY" diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index da32c76..061f4d9 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -425,7 +425,7 @@ else unzip -o /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 + rm -rf /tmp/chromedriver_linux64.zip fi printf "\nCheck Google Software Working...\n" -- 2.34.1 From 03251bd0434d1a5504916333462475067283c35c Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Fri, 19 Aug 2022 06:47:21 -0500 Subject: [PATCH 04/17] 7.0.4 (#85) * quick_jibri_installer.sh,jwt.sh: update anonymous string on prosody setup. -fix small format issues. --- mode/jwt.sh | 2 +- quick_jibri_installer.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mode/jwt.sh b/mode/jwt.sh index 73dc381..9c3ae62 100644 --- a/mode/jwt.sh +++ b/mode/jwt.sh @@ -54,7 +54,7 @@ apt-get install -y jitsi-meet-tokens #Setting up sed -i "s|c2s_require_encryption = true|c2s_require_encryption = false|" "$PROSODY_SYS" #- -sed -i "$SRP_STR,$SRP_END{s|authentication = \"anonymous\"|authentication = \"token\"|}" "$PROSODY_FILE" +sed -i "$SRP_STR,$SRP_END{s|authentication = \"jitsi-anonymous\"|authentication = \"token\"|}" "$PROSODY_FILE" sed -i "s|--app_id=\"example_app_id\"|app_id=\"$APP_ID\"|" "$PROSODY_FILE" sed -i "s|--app_secret=\"example_app_secret\"|app_secret=\"$SECRET_APP\"|" "$PROSODY_FILE" sed -i "/app_secret/a \\\\" "$PROSODY_FILE" diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 061f4d9..87f2c1a 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -172,13 +172,13 @@ if [ "$DIST" = "bionic" ]; then fi #Check system resources -echo "Verifying System Resources:" +printf "\n\nVerifying System Resources:" if [ "$(nproc --all)" -lt 4 ];then printf "\nWarning!: The system do not meet the minimum CPU requirements for Jibri to run." - printf "\n>> We recommend 4 cores/threads for Jibri!\n\n" + printf "\n>> We recommend 4 cores/threads for Jibri!\n" CPU_MIN="N" else - printf "\nCPU Cores/Threads: OK (%s)\n\n" "$(nproc --all)" + printf "\nCPU Cores/Threads: OK (%s)\n" "$(nproc --all)" CPU_MIN="Y" fi sleep .1 @@ -189,7 +189,7 @@ if [ "$mem_available" -lt 7700000 ]; then printf "\n>> We recommend 8GB RAM for Jibri!\n\n" MEM_MIN="N" else - printf "\nMemory: OK (%s) MiB)\n\n" "$(mem_available/1024)" + printf "\nMemory: OK (%s) MiB\n\n" "$((mem_available/1024))" MEM_MIN="Y" fi sleep .1 @@ -1058,7 +1058,7 @@ if [ "$ENABLE_SA" = "yes" ] && [ -f "$WS_CONF" ]; then fi #nginx -tlsv1/1.1 if [ "$DROP_TLS1" = "yes" ];then - printf "\nDropping TLSv1/1.1\\nn" + printf "\nDropping TLSv1/1.1\n\n" sed -i "s|TLSv1 TLSv1.1||" /etc/nginx/nginx.conf elif [ "$DROP_TLS1" = "no" ];then printf "\nNo TLSv1/1.1 dropping was done.\n\n" @@ -1073,7 +1073,7 @@ sleep .1 if [ "$ENABLE_SC" = "yes" ]; then SRP_STR=$(grep -n "VirtualHost \"$DOMAIN\"" "$PROSODY_FILE" | awk -F ':' 'NR==1{print$1}') SRP_END=$((SRP_STR + 10)) - sed -i "$SRP_STR,$SRP_END{s|authentication = \"anonymous\"|authentication = \"internal_hashed\"|}" "$PROSODY_FILE" + sed -i "$SRP_STR,$SRP_END{s|authentication = \"jitsi-anonymous\"|authentication = \"internal_hashed\"|}" "$PROSODY_FILE" sed -i "s|// anonymousdomain: 'guest.example.com'|anonymousdomain: \'guest.$DOMAIN\'|" "$MEET_CONF" #Secure room initial user -- 2.34.1 From 658bb07fdd437cc72e35b68e21af8102d66fe2bc Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Fri, 19 Aug 2022 07:23:41 -0500 Subject: [PATCH 05/17] 7.0.5 (#86) * quick_jibri_installer.sh: use new setup to enable local recording feature. --- quick_jibri_installer.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 87f2c1a..24c7b2b 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -300,7 +300,7 @@ sleep .1 #Sysadmin email while [ -z "$SYSADMIN_EMAIL" ] do - read -p " > Set sysadmin email (this is a mandatory field):$NL" -r SYSADMIN_EMAIL + read -p "$NL > Set sysadmin email (this is a mandatory field):$NL" -r SYSADMIN_EMAIL done sleep .1 #Simple DNS test @@ -805,7 +805,10 @@ BREWERY # Jibri tweaks for /etc/jitsi/meet/$DOMAIN-config.js sed -i "s|conference.$DOMAIN|internal.auth.$DOMAIN|" "$MEET_CONF" -sed -i "s|// fileRecordingsEnabled: false,|fileRecordingsEnabled: true,| " "$MEET_CONF" +#New recording implementation. +sed -i "s|// recordingService:|recordingService:|" "$MEET_CONF" +sed -i "/recordingService/,/hideStorageWarning/s|// enabled: false,| enabled: true,|" "$MEET_CONF" +sed -i "/hideStorageWarning: false/,/Local recording configuration/s|// },|},|" "$MEET_CONF" sed -i "s|// liveStreamingEnabled: false,|liveStreamingEnabled: true,\\ \\ hiddenDomain: \'recorder.$DOMAIN\',|" "$MEET_CONF" -- 2.34.1 From 9ab18fc8922d74fbfeb546c806daf25b40d956a0 Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Fri, 30 Sep 2022 04:04:31 -0500 Subject: [PATCH 06/17] 7.0.6 (#88) * jitsi-updater.sh: fix jitsi repo package update filtering. --- jitsi-updater.sh | 4 ++-- jm-bm.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jitsi-updater.sh b/jitsi-updater.sh index b1af3f4..cbac459 100644 --- a/jitsi-updater.sh +++ b/jitsi-updater.sh @@ -56,12 +56,12 @@ PREAD_PROXY="$(grep -nr "preread_server_name" "$JITSI_MEET_PROXY" | cut -d ":" - fi INT_CONF="/usr/share/jitsi-meet/interface_config.js" INT_CONF_ETC="/etc/jitsi/meet/$DOMAIN-interface_config.js" -read -r -a jibri_packages < <(grep Package /var/lib/apt/lists/download.jitsi.org_*_Packages | \ +read -r -a jibri_packages < <(grep ^Package /var/lib/apt/lists/download.jitsi.org_*_Packages | \ sort -u | awk '{print $2}' | sed '/jigasi/d' | \ xargs) AVATAR="$(grep -r avatar /etc/nginx/sites-*/ 2>/dev/null)" if [ -f "$apt_repo"/google-chrome.list ]; then -read -r -a google_package < <(grep Package /var/lib/apt/lists/dl.google.com_*_Packages | \ +read -r -a google_package < <(grep ^Package /var/lib/apt/lists/dl.google.com_*_Packages | \ sort -u | awk '{print $2}' | xargs) else echo "Seems no Google repo installed" diff --git a/jm-bm.sh b/jm-bm.sh index 39a6dca..9fb3a9e 100644 --- a/jm-bm.sh +++ b/jm-bm.sh @@ -65,7 +65,7 @@ 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" +sed -i "s|icon-cloud.png|gnome_record.png|g" "$BUNDLE_JS" #Disable logo and url if ! grep -q ".leftwatermark{display:none" "$CSS_FILE" ; then sed -i "s|.leftwatermark{|.leftwatermark{display:none;|" "$CSS_FILE" -- 2.34.1 From dd0de86c714f9721028700a90dde871e354a0c9a Mon Sep 17 00:00:00 2001 From: Ark74 Date: Tue, 15 Nov 2022 02:56:26 -0600 Subject: [PATCH 07/17] changelog: add changelog --- changelog | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..17c6eac --- /dev/null +++ b/changelog @@ -0,0 +1,76 @@ +quick-jibri-installer (7.0.6) + + * jitsi-updater.sh: fix jitsi repo package update filtering. + +-- Software, IT & Networks Fri Sep 30 04:04:31 2022 -0500 + +quick-jibri-installer (7.0.5) + + * quick_jibri_installer.sh: use new setup to enable local recording feature. + +-- Software, IT & Networks Fri Aug 19 07:23:41 2022 -0500 + +quick-jibri-installer (7.0.4) + + * quick_jibri_installer.sh,jwt.sh: update anonymous string on prosody setup. + -fix small format issues. + +-- Software, IT & Networks Fri Aug 19 06:47:21 2022 -0500 + +quick-jibri-installer (7.0.3) + + * jitsi-updater: fix condition to set turn config. + * quick-jibri-installer: fix typo on path. + +-- Software, IT & Networks Thu Jun 30 09:57:12 2022 -0500 + +quick-jibri-installer (7.0.2) + + * Detect jibri node by jitsi-updater. + +-- Software, IT & Networks Fri Jun 17 16:36:15 2022 -0500 + +quick-jibri-installer (7.0.1) + + * Fix debug mode on triggered scripts. + * Fix grep condition. + +-- Software, IT & Networks Mon May 23 23:17:39 2022 -0500 + +quick-jibri-installer (7.0) + + * Major rework, comply with shellcheck + + ## Add + * Add experimental tool for AWS grub setup. + + ## Fix + * Fix grafana configuration + * Actually apply changes to nginx conf instead of symlink. + * Actually require to run with admin rights. + * Improve comments. + * Rename and fix set_once function. + * Fix jibri domain. + + ## Improve + * Comply mode section with shellcheck recommendations. + * Comply tools section with shellcheck recommendations. + * Comply main scripts with shellcheck recommendations. + * Improve shell quality + * Change JDK version to 11 + * Make warning visible. + * Change email position, and small fixes + * Several indenting changes + * Set warning instead of "note". + * Yet again more fixes on echo and printf + * Standarize jra_nextcloud + * Add comment on debconf state + * Update SwITNet copyright and standarize debug option for scripts. + + ## Remove + * Rename deprecated scripts folder + * Remove old + * Remove unused code + * Finally remove jigasi deprecated script. + +-- Software, IT & Networks Fri May 20 20:07:02 2022 -0500 -- 2.34.1 From b67dda5efac7b34438ef495ab57322c7bed52d79 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Tue, 15 Nov 2022 02:58:25 -0600 Subject: [PATCH 08/17] bump version 7.0.8 --- changelog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/changelog b/changelog index 17c6eac..29fcc08 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,17 @@ +quick-jibri-installer (7.0.8) + + * jitsi-updater.sh: add checks for openjdk and nodejs supported versions + * add-jibri-node.sh: set openjdk-jre-headless default version to 11 + * changelog: add changelog + +-- Software, IT & Networks Tue Nov 15 02:56:26 2022 -0600 + +quick-jibri-installer (7.0.7) + + * quick_jibri_installer.sh: fix jaas & acme integration + +-- Software, IT & Networks Sun Oct 23 23:52:23 2022 -0500 + quick-jibri-installer (7.0.6) * jitsi-updater.sh: fix jitsi repo package update filtering. -- 2.34.1 From 56ce1e517318f2c26f2bf94be528e17c9ddf39bd Mon Sep 17 00:00:00 2001 From: Ark74 Date: Tue, 15 Nov 2022 02:56:26 -0600 Subject: [PATCH 09/17] changelog: add changelog --- changelog | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..17c6eac --- /dev/null +++ b/changelog @@ -0,0 +1,76 @@ +quick-jibri-installer (7.0.6) + + * jitsi-updater.sh: fix jitsi repo package update filtering. + +-- Software, IT & Networks Fri Sep 30 04:04:31 2022 -0500 + +quick-jibri-installer (7.0.5) + + * quick_jibri_installer.sh: use new setup to enable local recording feature. + +-- Software, IT & Networks Fri Aug 19 07:23:41 2022 -0500 + +quick-jibri-installer (7.0.4) + + * quick_jibri_installer.sh,jwt.sh: update anonymous string on prosody setup. + -fix small format issues. + +-- Software, IT & Networks Fri Aug 19 06:47:21 2022 -0500 + +quick-jibri-installer (7.0.3) + + * jitsi-updater: fix condition to set turn config. + * quick-jibri-installer: fix typo on path. + +-- Software, IT & Networks Thu Jun 30 09:57:12 2022 -0500 + +quick-jibri-installer (7.0.2) + + * Detect jibri node by jitsi-updater. + +-- Software, IT & Networks Fri Jun 17 16:36:15 2022 -0500 + +quick-jibri-installer (7.0.1) + + * Fix debug mode on triggered scripts. + * Fix grep condition. + +-- Software, IT & Networks Mon May 23 23:17:39 2022 -0500 + +quick-jibri-installer (7.0) + + * Major rework, comply with shellcheck + + ## Add + * Add experimental tool for AWS grub setup. + + ## Fix + * Fix grafana configuration + * Actually apply changes to nginx conf instead of symlink. + * Actually require to run with admin rights. + * Improve comments. + * Rename and fix set_once function. + * Fix jibri domain. + + ## Improve + * Comply mode section with shellcheck recommendations. + * Comply tools section with shellcheck recommendations. + * Comply main scripts with shellcheck recommendations. + * Improve shell quality + * Change JDK version to 11 + * Make warning visible. + * Change email position, and small fixes + * Several indenting changes + * Set warning instead of "note". + * Yet again more fixes on echo and printf + * Standarize jra_nextcloud + * Add comment on debconf state + * Update SwITNet copyright and standarize debug option for scripts. + + ## Remove + * Rename deprecated scripts folder + * Remove old + * Remove unused code + * Finally remove jigasi deprecated script. + +-- Software, IT & Networks Fri May 20 20:07:02 2022 -0500 -- 2.34.1 From 1bfa6b90a2afeb1f836b6e1454b953e4d13e61de Mon Sep 17 00:00:00 2001 From: Ark74 Date: Tue, 15 Nov 2022 02:58:25 -0600 Subject: [PATCH 10/17] bump version 7.0.8 --- changelog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/changelog b/changelog index 17c6eac..29fcc08 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,17 @@ +quick-jibri-installer (7.0.8) + + * jitsi-updater.sh: add checks for openjdk and nodejs supported versions + * add-jibri-node.sh: set openjdk-jre-headless default version to 11 + * changelog: add changelog + +-- Software, IT & Networks Tue Nov 15 02:56:26 2022 -0600 + +quick-jibri-installer (7.0.7) + + * quick_jibri_installer.sh: fix jaas & acme integration + +-- Software, IT & Networks Sun Oct 23 23:52:23 2022 -0500 + quick-jibri-installer (7.0.6) * jitsi-updater.sh: fix jitsi repo package update filtering. -- 2.34.1 From 18e4b5ca407c154a03f9aa1f37276fc0276ce293 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 22 Feb 2023 03:44:44 -0600 Subject: [PATCH 11/17] quick_jibri_installer.sh: increase support to 22.04 fix key agregation and remove deprecated letsencrypt ppa --- quick_jibri_installer.sh | 62 ++++++++++------------------------------ 1 file changed, 15 insertions(+), 47 deletions(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 4b3efa4..e952dee 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -108,8 +108,8 @@ echo "Add Prosody repo" 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 - + echo "deb [signed-by=/etc/apt/trusted.gpg.d/prosody-debian-packages.key] http://packages.prosody.im/debian $(lsb_release -sc) main" > /etc/apt/sources.list.d/prosody.list + curl -s https://prosody.im/files/prosody-debian-packages.key > /etc/apt/trusted.gpg.d/prosody-debian-packages.key fi } dpkg-compare() { @@ -150,24 +150,24 @@ if ! [ "$(id -u)" = 0 ]; then fi printf "\nOS: %s" "$(lsb_release -sd)" -if [ "$DIST" = "bionic" ] || \ - [ "$DIST" = "focal" ]; then +if [ "$DIST" = "focal" ] || \ + [ "$DIST" = "jammy" ]; then printf "\nGood, this is a supported platform!" else printf "\nSorry, this platform is not supported... exiting" exit fi -#Suggest 20.04 LTS release over 18.04 in April 2022 +#Suggest 22.04 LTS release over 20.04 in April 2024 TODAY=$(date +%s) -NEXT_LTS_DATE=$(date -d 2022-04-01 +%s) +NEXT_LTS_DATE=$(date -d 2024-04-01 +%s) -if [ "$DIST" = "bionic" ]; then +if [ "$DIST" = "focal" ]; then if [ "$TODAY" -gt "$NEXT_LTS_DATE" ]; then 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' else - echo "Bionic is supported." + echo "Focal is supported." fi fi @@ -266,8 +266,8 @@ printf "\nAdd Jitsi repo\n" if [ "$JITSI_REPO" = "stable" ]; then printf " - Jitsi stable repository already installed\n\n" else - echo 'deb http://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list - wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add - + echo 'deb [signed-by=/etc/apt/trusted.gpg.d/jitsi-key.gpg.key] http://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list + curl -s https://download.jitsi.org/jitsi-key.gpg.key > /etc/apt/trusted.gpg.d/jitsi-key.gpg.key JITSI_REPO="stable" fi sleep .1 @@ -279,7 +279,7 @@ if [ "$LE_SSL" = yes ]; then printf " - We'll setup Let's Encrypt SSL certs.\n\n" else printf " - We'll let you choose later on for it." - printf" Please be aware that a valid SSL cert is required for some features to work properly.\n\n" + printf " Please be aware that a valid SSL cert is required for some features to work properly.\n\n" fi done sleep .1 @@ -341,7 +341,7 @@ apt-get -y install \ if [ "$LE_SSL" = "yes" ]; then apt-get -y install \ - letsencrypt + certbot if [ "$(dpkg-query -W -f='${Status}' ufw 2>/dev/null | grep -c "ok installed")" == "1" ]; then echo "# Disable pre-installed ufw, more on firewall see: > https://github.com/switnet-ltd/quick-jibri-installer/wiki/Firewall" @@ -412,7 +412,8 @@ if [ "$GOOGLE_ACTIVE_REPO" = "main" ]; 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 - + curl -s https://dl.google.com/linux/linux_signing_key.pub | \ + gpg --dearmor | tee /etc/apt/trusted.gpg.d/google-chrome-key.gpg >/dev/null echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | tee "$GOOGL_REPO" fi apt-get -q2 update @@ -470,8 +471,6 @@ 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 | 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)" MJS_USER="jbsync_$MJS_RAND_TAIL" @@ -686,7 +685,7 @@ INT_CONF_ETC="/etc/jitsi/meet/$DOMAIN-interface_config.js" ssl_wa() { if [ "$LE_SSL" = "yes" ]; then systemctl stop "$1" - letsencrypt certonly --standalone --renew-by-default --agree-tos --email "$5" -d "$6" + certbot certonly --standalone --renew-by-default --agree-tos --email "$5" -d "$6" sed -i "s|/etc/jitsi/meet/$3.crt|/etc/letsencrypt/live/$3/fullchain.pem|" "$4" sed -i "s|/etc/jitsi/meet/$3.key|/etc/letsencrypt/live/$3/privkey.pem|" "$4" systemctl restart "$1" @@ -700,35 +699,6 @@ if [ "$LE_SSL" = "yes" ]; then fi } -enable_letsencrypt() { -if [ "$LE_SSL" = "yes" ]; then - echo ' -#-------------------------------------------------- -# Starting LetsEncrypt configuration -#-------------------------------------------------- -' -#Disabled 'til fixed upstream -#bash /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh - - echo "#Set and upgrade certbot PPA if posssible..." - if [ "$CERTBOT_REPO" = "certbot" ]; then - printf "\nCertbot repository already on the system!\nChecking for updates...\n" - apt-get -q2 update - apt-get -yq2 dist-upgrade - elif [ "$(curl -s -o /dev/null -w "%{http_code}" "$CERTBOT_REL_FILE" )" == "200" ]; then - printf "\nAdding cerbot (formerly letsencrypt) PPA repository for latest updates\n" - echo "deb http://ppa.launchpad.net/certbot/certbot/ubuntu $DIST main" > /etc/apt/sources.list.d/certbot.list - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 75BCA694 - apt-get -q2 update - apt-get -yq2 dist-upgrade - elif [ "$(curl -s -o /dev/null -w "%{http_code}" "$CERTBOT_REL_FILE" )" == "404" ]; then - printf "\nCertbot PPA is not available for %s just yet, it won't be installed...\n" "$(lsb_release -sc)" - fi -else - echo "SSL setup will be skipped." -fi -} - check_jibri() { if [ "$(dpkg-query -W -f='${Status}' "jibri" 2>/dev/null | grep -c "ok installed")" == "1" ] then @@ -1194,8 +1164,6 @@ if [ "$DISABLE_LOCAL_JIBRI" = "yes" ]; then chmod -R 770 "$DIR_RECORD" fi -enable_letsencrypt - # Fix prosody not able to read SSL Certs chown -R root:prosody /etc/prosody/certs/ chmod -R 650 /etc/prosody/certs/ -- 2.34.1 From 89f03fdbe4c33142f23077aa147ca21101f6c034 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 22 Feb 2023 03:50:59 -0600 Subject: [PATCH 12/17] etherpad-docker.sh: fix key agregation and variable collection. --- etherpad-docker.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etherpad-docker.sh b/etherpad-docker.sh index e78be9c..72999d1 100644 --- a/etherpad-docker.sh +++ b/etherpad-docker.sh @@ -45,7 +45,7 @@ fi DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)" MEET_CONF="/etc/jitsi/meet/$DOMAIN-config.js" WS_CONF="/etc/nginx/sites-available/$DOMAIN.conf" -PSGVER="$(apt-cache madison postgresql|awk -F'[ +]' 'NR==1{print $3}')" +PSGVER="$(apt-cache madison postgresql|tr -d '[:blank:]'|awk -F'[|+]' 'NR==1{print $2}')" ETHERPAD_DB_USER="dockerpad" ETHERPAD_DB_NAME="etherpad" ETHERPAD_DB_PASS="$(tr -dc "a-zA-Z0-9#*=" < /dev/urandom | fold -w 10 | head -n1)" @@ -56,7 +56,8 @@ if [ "$DOCKER_CE_REPO" = "stable" ]; then echo "Docker repository already installed" else echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker-ce.list - wget -qO - https://download.docker.com/linux/ubuntu/gpg | apt-key add - + wget -qO - https://download.docker.com/linux/ubuntu/gpg | \ + gpg --dearmor | tee /etc/apt/trusted.gpg.d/docker-gpg-key.gpg >/dev/null apt -q2 update fi -- 2.34.1 From 1b016ffb6811ec1d5daeb25cd75a4447d8aee0d0 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 22 Feb 2023 03:52:00 -0600 Subject: [PATCH 13/17] grafana.sh: fix gpg key agregation --- grafana.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/grafana.sh b/grafana.sh index 029a9a8..fb3910f 100644 --- a/grafana.sh +++ b/grafana.sh @@ -60,15 +60,16 @@ apt-get install -y gnupg2 \ echo " # Setup InfluxDB Packages " -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 +curl -s https://repos.influxdata.com/influxdata-archive.key > /etc/apt/trusted.gpg.d/influxdata-archive.key +echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive.key] https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list apt-get update && apt-get install influxdb -y run_service influxdb echo " # Setup Grafana Packages " -curl -s https://packages.grafana.com/gpg.key | sudo apt-key add - +curl -s https://apt.grafana.com/gpg-full.key | \ +gpg --dearmor | tee /etc/apt/trusted.gpg.d/grafana-full-key.gpg >/dev/null add-apt-repository "deb https://packages.grafana.com/oss/deb stable main" apt-get update && apt-get install grafana -y run_service grafana-server @@ -76,8 +77,6 @@ run_service grafana-server echo " # Setup Telegraf Packages " -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 apt-get update && apt-get install telegraf -y mv /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.original @@ -134,7 +133,7 @@ JITSI_TELEGRAF run_service telegraf -echo -n "\n# Setup videobridge options\n" +echo -e "\n# Setup videobridge options\n" echo ' # extra options to pass to the JVB daemon JVB_OPTS="--apis=rest,xmpp"' >> /etc/jitsi/videobridge/config -- 2.34.1 From 243a8eb500d2ea26adbee6b9ca92d751d699c794 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 22 Feb 2023 03:53:04 -0600 Subject: [PATCH 14/17] jm-bm.sh: tweak sed --- jm-bm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jm-bm.sh b/jm-bm.sh index 9fb3a9e..dc1127e 100644 --- a/jm-bm.sh +++ b/jm-bm.sh @@ -74,7 +74,7 @@ fi #Customize room title sed -i "s|Jitsi Meet|$APP_NAME|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|g" /usr/share/jitsi-meet/lang/* #Custom UI changes if [ -f "$INT_CONF_ETC" ]; then -- 2.34.1 From 01b90941653e2ab08dff4790d4b98292f7f6d910 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 22 Feb 2023 03:54:21 -0600 Subject: [PATCH 15/17] jra_nextcloud.sh: fix key agregation and variable collection. --- jra_nextcloud.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index e21e8a8..0cd645e 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -41,8 +41,8 @@ exit_if_not_installed jitsi-meet DISTRO_RELEASE="$(lsb_release -sc)" DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)" PHP_REPO="$(apt-cache policy | awk '/http/&&/php/{print$2}' | awk -F "/" 'NR==1{print$5}')" -PHPVER="7.4" -PSGVER="$(apt-cache madison postgresql|awk -F'[ +]' 'NR==1{print $3}')" +PHPVER="$(apt-cache madison php|grep -v ppa|awk -F'[:+]' 'NR==1{print $2}')" +PSGVER="$(apt-cache madison postgresql|tr -d '[:blank:]'|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" @@ -58,12 +58,19 @@ NC_DB_PASSWD="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)" DIR_RECORD="$(awk -F '"' '/RECORDING/{print$2}' /home/jibri/finalize_recording.sh|awk 'NR==1{print$1}')" 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) +if [ -f "$JITSI_MEET_PROXY" ];then +PREAD_PROXY=$(grep -nr "preread_server_name" "$JITSI_MEET_PROXY" | cut -d ":" -f1) fi PUBLIC_IP="$(dig +short myip.opendns.com @resolver1.opendns.com)" ISO3166_CODE=TBD NL="$(printf '\n ')" +TMP_GPG_REPO="$(mktemp)" +add_gpg_keyring() { +apt-key adv --recv-keys --keyserver keyserver.ubuntu.com "$1" +apt-key export "$1" | gpg --dearmour | tee "$TMP_GPG_REPO"/"$1".gpg >/dev/null +apt-key del "$1" +mv "$TMP_GPG_REPO"/"$1".gpg /etc/apt/trusted.gpg.d/ +} while [[ "$ANS_NCD" != "yes" ]] do @@ -171,8 +178,8 @@ if [ "$PHP_REPO" = "php" ]; then apt-get -yq2 dist-upgrade else echo "# Adding Ondrej PHP $PHPVER PPA Repository" - 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 + add_gpg_keyring E5267A6C + echo "deb [arch=amd64] http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/php"$PHPVER".list apt-get update -q2 fi } -- 2.34.1 From 42703a005f29a6e2927bceab5ccca8ec7f03b055 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 22 Feb 2023 04:54:12 -0600 Subject: [PATCH 16/17] jra_nextcloud.sh: fix add gpgp key function and add install available version pacjage --- jra_nextcloud.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index 0cd645e..eb3ad86 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -64,13 +64,27 @@ fi PUBLIC_IP="$(dig +short myip.opendns.com @resolver1.opendns.com)" ISO3166_CODE=TBD NL="$(printf '\n ')" -TMP_GPG_REPO="$(mktemp)" +TMP_GPG_REPO="$(mktemp -d)" add_gpg_keyring() { apt-key adv --recv-keys --keyserver keyserver.ubuntu.com "$1" apt-key export "$1" | gpg --dearmour | tee "$TMP_GPG_REPO"/"$1".gpg >/dev/null apt-key del "$1" mv "$TMP_GPG_REPO"/"$1".gpg /etc/apt/trusted.gpg.d/ } +install_aval_package() { +for i in $1 + do + if [ -z "$(apt-cache madison $i 2>/dev/null)" ]; then + echo " > Package $i not available on repo." + else + echo " > Add package $i to the install list" + packages="$packages $i" + fi + done + echo "$packages" + apt-get -y install $packages + packages="" +} while [[ "$ANS_NCD" != "yes" ]] do @@ -171,7 +185,7 @@ else apt-get -yq2 install "$1" fi } -add_php74() { +add_php() { if [ "$PHP_REPO" = "php" ]; then echo "PHP $PHPVER already installed" apt-get -q2 update @@ -193,8 +207,8 @@ exit_ifinstalled postgresql-"$PSGVER" install_ifnot postgresql-"$PSGVER" # PHP 7.4 -add_php74 -apt-get install -y \ +add_php +install_aval_package \ imagemagick \ php"$PHPVER"-fpm \ php"$PHPVER"-bcmath \ -- 2.34.1 From 8df68aeb56d12c37f930cb260dd4b542b1037d0a Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 22 Feb 2023 05:23:19 -0600 Subject: [PATCH 17/17] jra_nextcloud.sh: small fix for install_aval_package function --- jra_nextcloud.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index eb3ad86..bd8ff03 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -208,7 +208,7 @@ install_ifnot postgresql-"$PSGVER" # PHP 7.4 add_php -install_aval_package \ +install_aval_package " \ imagemagick \ php"$PHPVER"-fpm \ php"$PHPVER"-bcmath \ @@ -228,7 +228,8 @@ install_aval_package \ php"$PHPVER"-xmlrpc \ php"$PHPVER"-zip \ redis-server \ - unzip + unzip \ + " #System related install_ifnot smbclient -- 2.34.1