forked from switnet/quick-jibri-installer
				
			Compare commits
	
		
			No commits in common. "c482ba367ae4a9a9f47bddbeba3bdb5168b4f3e8" and "8eeb286defafcd9bf51ae913b310ac03374a9544" have entirely different histories.
		
	
	
		
			c482ba367a
			...
			8eeb286def
		
	
		|  | @ -118,4 +118,4 @@ Feel free to use our `test-jibri-env.sh` tool to find some details on your curre | ||||||
| 
 | 
 | ||||||
| Please note: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. | Please note: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. | ||||||
| 
 | 
 | ||||||
| SwITNet Ltd © - 2025, https://switnet.net/ | SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Jibri Node Aggregator | # Jibri Node Aggregator | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| ### 0_LAST EDITION TIME STAMP ### | ### 0_LAST EDITION TIME STAMP ### | ||||||
|  | @ -16,13 +16,9 @@ do | ||||||
| 	esac | 	esac | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
|  | #DEBUG | ||||||
| if [ "$MODE" = "debug" ]; then | if [ "$MODE" = "debug" ]; then | ||||||
|     set -x | set -x | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| if ! [ "$(id -u)" = 0 ]; then |  | ||||||
|    echo "You need to be root or have sudo privileges!" |  | ||||||
|    exit 0 |  | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| #Make sure the file name is the required one | #Make sure the file name is the required one | ||||||
|  | @ -32,6 +28,12 @@ if [ ! "$(basename "$0")" = "add-jibri-node.sh" ]; then | ||||||
|     exit |     exit | ||||||
| fi | 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 | ### 0_VAR_DEF | ||||||
| MAIN_SRV_DIST=TBD | MAIN_SRV_DIST=TBD | ||||||
| MAIN_SRV_REPO=TBD | MAIN_SRV_REPO=TBD | ||||||
|  | @ -49,18 +51,17 @@ JITSI_REPO=$(apt-cache policy | awk '/jitsi/&&/stable/{print$3}' | awk -F / 'NR= | ||||||
| JIBRI_CONF="/etc/jitsi/jibri/jibri.conf" | JIBRI_CONF="/etc/jitsi/jibri/jibri.conf" | ||||||
| DIR_RECORD="/var/jbrecord" | DIR_RECORD="/var/jbrecord" | ||||||
| REC_DIR="/home/jibri/finalize_recording.sh" | 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" | GOOGL_REPO="/etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list" | ||||||
| GOOGLE_ACTIVE_REPO=$(apt-cache policy | awk '/chrome/{print$3}' | awk -F "/" 'NR==1{print$2}') | GOOGLE_ACTIVE_REPO=$(apt-cache policy | awk '/chrome/{print$3}' | awk -F "/" 'NR==1{print$2}') | ||||||
| GCMP_JSON="/etc/opt/chrome/policies/managed/managed_policies.json" | GCMP_JSON="/etc/opt/chrome/policies/managed/managed_policies.json" | ||||||
| #PUBLIC_IP="$(wget -qO- https://api.ipify.org)" | #PUBLIC_IP="$(dig -4 @resolver1.opendns.com ANY myip.opendns.com +short)" | ||||||
| JITSI_GPG_KEY="/etc/apt/trusted.gpg.d/jitsi-key.gpg.key" |  | ||||||
| NJN_RAND_TAIL="$(tr -dc "a-zA-Z0-9" < /dev/urandom | fold -w 4 | head -n1)" | NJN_RAND_TAIL="$(tr -dc "a-zA-Z0-9" < /dev/urandom | fold -w 4 | head -n1)" | ||||||
| NJN_USER="jbnode${ADDUP}_${NJN_RAND_TAIL}" | NJN_USER="jbnode${ADDUP}_${NJN_RAND_TAIL}" | ||||||
| NJN_USER_PASS="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 32 | head -n1)" | NJN_USER_PASS="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 32 | head -n1)" | ||||||
| GIT_FORGE="https://forge.switnet.net" | GITHUB_RAW="https://raw.githubusercontent.com" | ||||||
| GIT_REPO="switnet/quick-jibri-installer" | GIT_REPO="switnet-ltd/quick-jibri-installer" | ||||||
| JIBRI_CONF_ONLINE="$GIT_FORGE/$GIT_REPO/raw/branch/master/files/jibri.conf" | TEST_JIBRI_ENV="$GITHUB_RAW/$GIT_REPO/unstable/tools/test-jibri-env.sh" | ||||||
| TEST_JIBRI_ENV="$GIT_FORGE/$GIT_REPO/raw/branch/master/tools/test-jibri-env.sh" |  | ||||||
| SHORT_ID="$(awk '{print substr($0,0,7)}' /etc/machine-id)" | SHORT_ID="$(awk '{print substr($0,0,7)}' /etc/machine-id)" | ||||||
| JIBRI_XORG_CONF="/etc/jitsi/jibri/xorg-video-dummy.conf" | JIBRI_XORG_CONF="/etc/jitsi/jibri/xorg-video-dummy.conf" | ||||||
| ### 1_VAR_DEF | ### 1_VAR_DEF | ||||||
|  | @ -187,19 +188,18 @@ hostnamectl set-hostname "jbnode_${SHORT_ID}.${MAIN_SRV_DOMAIN}" | ||||||
| sed -i "1i 127.0.0.1 jbnode_${SHORT_ID}.${MAIN_SRV_DOMAIN}" /etc/hosts | sed -i "1i 127.0.0.1 jbnode_${SHORT_ID}.${MAIN_SRV_DOMAIN}" /etc/hosts | ||||||
| 
 | 
 | ||||||
| # Jitsi-Meet Repo | # Jitsi-Meet Repo | ||||||
| printf "\nAdd Jitsi repo\n" | echo "Add Jitsi repo" | ||||||
| if [ "$JITSI_REPO" = "stable" ]; then | if [ -z "$JITSI_REPO" ]; then | ||||||
|     printf " - Jitsi stable repository already installed\n\n" |     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 | else | ||||||
|     echo "deb [signed-by=$JITSI_GPG_KEY] http://download.jitsi.org stable/" \ |     echo "Jitsi $JITSI_REPO repository already installed" | ||||||
|         > /etc/apt/sources.list.d/jitsi-stable.list |  | ||||||
|     curl -s https://download.jitsi.org/jitsi-key.gpg.key \ |  | ||||||
|         > "$JITSI_GPG_KEY" |  | ||||||
|     apt-get update -q2 |  | ||||||
|     JITSI_REPO="stable" |  | ||||||
| fi | fi | ||||||
| sleep .1 |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
| # Requirements | # Requirements | ||||||
| echo "We'll start by installing system requirements this may take a while please be patient..." | echo "We'll start by installing system requirements this may take a while please be patient..." | ||||||
|  | @ -212,7 +212,7 @@ apt-get -y install \ | ||||||
|                     curl \ |                     curl \ | ||||||
|                     ffmpeg \ |                     ffmpeg \ | ||||||
|                     git \ |                     git \ | ||||||
|                     btop \ |                     htop \ | ||||||
|                     inotify-tools \ |                     inotify-tools \ | ||||||
|                     jq \ |                     jq \ | ||||||
|                     rsync \ |                     rsync \ | ||||||
|  | @ -221,30 +221,32 @@ apt-get -y install \ | ||||||
|                     wget |                     wget | ||||||
| 
 | 
 | ||||||
| check_snd_driver() { | check_snd_driver() { | ||||||
|     printf "\n# Checking ALSA - Loopback module..." | echo -e "\n# Checking ALSA - Loopback module..." | ||||||
|     echo "snd-aloop" | tee -a /etc/modules | echo "snd-aloop" | tee -a /etc/modules | ||||||
|     modprobe snd-aloop | modprobe snd-aloop | ||||||
|     if [ "$(lsmod|awk '/snd_aloop/{print$1}'|awk 'NR==1')" = "snd_aloop" ]; then | if [ "$(lsmod | grep snd_aloop | head -n 1 | cut -d " " -f1)" = "snd_aloop" ]; then | ||||||
|         echo -e "\n#-----------------------------------------------------------------------" |     echo " | ||||||
|         echo "# Audio driver seems - OK." | #----------------------------------------------------------------------- | ||||||
|         echo -e "#-----------------------------------------------------------------------\n" | # Audio driver seems - OK. | ||||||
|     else | #-----------------------------------------------------------------------" | ||||||
|         echo -e "\n#-----------------------------------------------------------------------" | else | ||||||
|         echo "# Your audio driver might not be able to load." |     echo " | ||||||
|         echo "# We'll check the state of this Jibri with our 'test-jibri-env.sh' tool." | #----------------------------------------------------------------------- | ||||||
|         echo -e "#-----------------------------------------------------------------------\n" | # Your audio driver might not be able to load. | ||||||
|         curl -s "$TEST_JIBRI_ENV" > /tmp/test-jibri-env.sh | # We'll check the state of this Jibri with our 'test-jibri-env.sh' tool. | ||||||
|         #Test tool | #-----------------------------------------------------------------------" | ||||||
|  | curl -s "$TEST_JIBRI_ENV" > /tmp/test-jibri-env.sh | ||||||
|  | #Test tool | ||||||
|   if [ "$MODE" = "debug" ]; then |   if [ "$MODE" = "debug" ]; then | ||||||
|     bash /tmp/test-jibri-env.sh -m debug |     bash /tmp/test-jibri-env.sh -m debug | ||||||
|   else |   else | ||||||
|     bash /tmp/test-jibri-env.sh |     bash /tmp/test-jibri-env.sh | ||||||
|   fi |   fi | ||||||
|         read -n 1 -s -r -p "Press any key to continue..."$'\n' | rm /tmp/test-jibri-env.sh | ||||||
|     fi | read -n 1 -s -r -p "Press any key to continue..."$'\n' | ||||||
|  | fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ###FIXME: Trisquel support broken by lsb_release usage### |  | ||||||
| echo "# Check and Install HWE kernel if possible..." | echo "# Check and Install HWE kernel if possible..." | ||||||
| HWE_VIR_MOD="$(apt-cache madison linux-image-generic-hwe-"$(lsb_release -sr)" 2>/dev/null|head -n1|grep -c hwe-"$(lsb_release -sr)")" | HWE_VIR_MOD="$(apt-cache madison linux-image-generic-hwe-"$(lsb_release -sr)" 2>/dev/null|head -n1|grep -c hwe-"$(lsb_release -sr)")" | ||||||
| if [ "$HWE_VIR_MOD" = "1" ]; then | if [ "$HWE_VIR_MOD" = "1" ]; then | ||||||
|  | @ -270,37 +272,27 @@ if [ "$GOOGLE_ACTIVE_REPO" = "main" ]; then | ||||||
|     echo "Google repository already set." |     echo "Google repository already set." | ||||||
| else | else | ||||||
|     echo "Installing Google Chrome Stable" |     echo "Installing Google Chrome Stable" | ||||||
|     curl -s https://dl.google.com/linux/linux_signing_key.pub | \ |     wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - | ||||||
|     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" |     echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | tee "$GOOGL_REPO" | ||||||
| fi | fi | ||||||
| apt-get -q2 update | apt-get -q2 update | ||||||
| apt-get install -yq2 google-chrome-stable | apt-get install -y google-chrome-stable | ||||||
| rm -rf "$GOOGL_REPO" | rm -rf /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list | ||||||
| 
 |  | ||||||
| G_CHROME=$(apt-cache madison google-chrome-stable|awk '{print$3}'|cut -d. -f1-3) |  | ||||||
| CHROMELAB_URL="https://googlechromelabs.github.io/chrome-for-testing" |  | ||||||
| CHD_LTST_DWNL=$(curl -s $CHROMELAB_URL/known-good-versions-with-downloads.json | \ |  | ||||||
|                 jq -r ".versions[].downloads.chromedriver | \ |  | ||||||
|                 select(. != null) | .[].url" | grep linux64 | \ |  | ||||||
|                 grep "$G_CHROME" | tail -1) |  | ||||||
| CHD_LTST=$(awk -F '/' '{print$7}' <<< "$CHD_LTST_DWNL") |  | ||||||
| GCMP_JSON="/etc/opt/chrome/policies/managed/managed_policies.json" |  | ||||||
| 
 | 
 | ||||||
| if [ -f /usr/local/bin/chromedriver ]; then | if [ -f /usr/local/bin/chromedriver ]; then | ||||||
|     echo "Chromedriver already installed." |     echo "Chromedriver already installed." | ||||||
| else | else | ||||||
|     echo "Installing Chromedriver" |     echo "Installing Chromedriver" | ||||||
|     wget -q "$CHD_LTST_DWNL" \ |     wget -q https://chromedriver.storage.googleapis.com/"$CHD_VER"/chromedriver_linux64.zip -O /tmp/chromedriver_linux64.zip | ||||||
|          -O /tmp/chromedriver_linux64.zip |     unzip /tmp/chromedriver_linux64.zip -d /usr/local/bin/ | ||||||
|     unzip -o /tmp/chromedriver_linux64.zip -d /usr/local/bin/ |  | ||||||
|     mv /usr/local/bin/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver |  | ||||||
|     chown root:root /usr/local/bin/chromedriver |     chown root:root /usr/local/bin/chromedriver | ||||||
|     chmod 0755 /usr/local/bin/chromedriver |     chmod 0755 /usr/local/bin/chromedriver | ||||||
|     rm -rf /tmp/chromedriver_linux64.zip |     rm -rf /tpm/chromedriver_linux64.zip | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| printf "\nCheck Google Software Working...\n" | echo " | ||||||
|  | Check Google Software Working... | ||||||
|  | " | ||||||
| /usr/bin/google-chrome --version | /usr/bin/google-chrome --version | ||||||
| /usr/local/bin/chromedriver --version | awk '{print$1,$2}' | /usr/local/bin/chromedriver --version | awk '{print$1,$2}' | ||||||
| 
 | 
 | ||||||
|  | @ -309,13 +301,15 @@ echo ' | ||||||
|                         Start Jibri configuration |                         Start Jibri configuration | ||||||
| ######################################################################## | ######################################################################## | ||||||
| ' | ' | ||||||
| printf "\nRemove Chrome warning...\n" | echo " | ||||||
|  | Remove Chrome warning... | ||||||
|  | " | ||||||
| mkdir -p /etc/opt/chrome/policies/managed | mkdir -p /etc/opt/chrome/policies/managed | ||||||
| echo '{ "CommandLineFlagSecurityWarningsEnabled": false }' > "$GCMP_JSON" | echo '{ "CommandLineFlagSecurityWarningsEnabled": false }' > "$GCMP_JSON" | ||||||
| 
 | 
 | ||||||
| # 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" | ||||||
| 
 | 
 | ||||||
|  | @ -331,10 +325,19 @@ echo "or storage provider, etc.) in this script" >> /tmp/finalize.out | ||||||
| 
 | 
 | ||||||
| chmod -R 770 \$RECORDINGS_DIR | chmod -R 770 \$RECORDINGS_DIR | ||||||
| 
 | 
 | ||||||
| LJF_PATH="\$(find \$RECORDINGS_DIR -exec stat --printf="%Y\t%n\n" {} \; | sort -nr|sed 1d|awk '{print\$2}'| grep -v "meta\|_" | head -n1)" | #Rename folder. | ||||||
| NJF_NAME="\$(find \$LJF_PATH |grep "mp4"|sed "s|\$LJF_PATH/||"|cut -d "." -f1)" | LJF_PATH="\$(find \$RECORDINGS_DIR -exec stat --printf="%Y\t%n\n" {} \; | sort -n -r|awk '{print\$2}'| grep -v "meta\|-" | head -n1)" | ||||||
|  | NJF_NAME="\$(find \$LJF_PATH |grep -e "-"|sed "s|\$LJF_PATH/||"|cut -d "." -f1)" | ||||||
| NJF_PATH="\$RECORDINGS_DIR/\$NJF_NAME" | NJF_PATH="\$RECORDINGS_DIR/\$NJF_NAME" | ||||||
| mv \$LJF_PATH \$NJF_PATH | 
 | ||||||
|  | ##Prevent empty recording directory failsafe | ||||||
|  | if [ "\$LJF_PATH" != "\$RECORDINGS_DIR" ]; then | ||||||
|  |   mv \$LJF_PATH \$NJF_PATH | ||||||
|  |   #Workaround for jibri to do cleaning. | ||||||
|  |   ssh -i /home/jibri/jbsync.pem $MJS_USER@$MAIN_SRV_DOMAIN "rm -r \$LJF_PATH" | ||||||
|  | else | ||||||
|  |   echo "No new folder recorded, not removing anything." | ||||||
|  | fi | ||||||
| 
 | 
 | ||||||
| exit 0 | exit 0 | ||||||
| REC_DIR | REC_DIR | ||||||
|  | @ -343,15 +346,117 @@ chmod +x "$REC_DIR" | ||||||
| 
 | 
 | ||||||
| ## New Jibri Config (2020) | ## New Jibri Config (2020) | ||||||
| mv "$JIBRI_CONF" "${JIBRI_CONF}"-dpkg-file | mv "$JIBRI_CONF" "${JIBRI_CONF}"-dpkg-file | ||||||
| curl -s "$JIBRI_CONF_ONLINE" >  "$JIBRI_CONF" | cat << NEW_CONF > "$JIBRI_CONF" | ||||||
| sed -i "s|JIBRI_RES_CONF|$JIBRI_RES_CONF|g" "$JIBRI_CONF" | // New XMPP environment config. | ||||||
| sed -i "s|DIR_RECORD|$DIR_RECORD|g" "$JIBRI_CONF" | jibri { | ||||||
| sed -i "s|REC_DIR|$REC_DIR|g" "$JIBRI_CONF" |     streaming { | ||||||
| sed -i "s|JB_NAME|$JB_NAME|g" "$JIBRI_CONF" |         // A list of regex patterns for allowed RTMP URLs.  The RTMP URL used | ||||||
| sed -i "s|DOMAIN|$MAIN_SRV_DOMAIN|g" "$JIBRI_CONF" |         // when starting a stream must match at least one of the patterns in | ||||||
| sed -i "s|JibriBrewery|$JibriBrewery|g" "$JIBRI_CONF" |         // this list. | ||||||
| sed -i "s|JB_AUTH_PASS|$JB_AUTH_PASS|g" "$JIBRI_CONF" |         rtmp-allow-list = [ | ||||||
| sed -i "s|JB_REC_PASS|$JB_REC_PASS|g" "$JIBRI_CONF" |           // By default, all services are allowed | ||||||
|  |           ".*" | ||||||
|  |         ] | ||||||
|  |     } | ||||||
|  |     ffmpeg { | ||||||
|  |         resolution = "$JIBRI_RES_CONF" | ||||||
|  |     } | ||||||
|  |     chrome { | ||||||
|  |         // The flags which will be passed to chromium when launching | ||||||
|  |         flags = [ | ||||||
|  |           "--use-fake-ui-for-media-stream", | ||||||
|  |           "--start-maximized", | ||||||
|  |           "--kiosk", | ||||||
|  |           "--enabled", | ||||||
|  |           "--disable-infobars", | ||||||
|  |           "--autoplay-policy=no-user-gesture-required", | ||||||
|  |           "--ignore-certificate-errors", | ||||||
|  |           "--disable-dev-shm-usage" | ||||||
|  |         ] | ||||||
|  |     } | ||||||
|  |     stats { | ||||||
|  |         enable-stats-d = true | ||||||
|  |     } | ||||||
|  |     call-status-checks { | ||||||
|  |         // If all clients have their audio and video muted and if Jibri does not | ||||||
|  |         // detect any data stream (audio or video) comming in, it will stop | ||||||
|  |         // recording after NO_MEDIA_TIMEOUT expires. | ||||||
|  |         no-media-timeout = 30 seconds | ||||||
|  | 
 | ||||||
|  |         // If all clients have their audio and video muted, Jibri consideres this | ||||||
|  |         // as an empty call and stops the recording after ALL_MUTED_TIMEOUT expires. | ||||||
|  |         all-muted-timeout = 10 minutes | ||||||
|  | 
 | ||||||
|  |         // When detecting if a call is empty, Jibri takes into consideration for how | ||||||
|  |         // long the call has been empty already. If it has been empty for more than | ||||||
|  |         // DEFAULT_CALL_EMPTY_TIMEOUT, it will consider it empty and stop the recording. | ||||||
|  |         default-call-empty-timeout = 30 seconds | ||||||
|  |     } | ||||||
|  |     recording { | ||||||
|  |          recordings-directory = $DIR_RECORD | ||||||
|  |          finalize-script = $REC_DIR | ||||||
|  |     } | ||||||
|  |     api { | ||||||
|  |         xmpp { | ||||||
|  |             environments = [ | ||||||
|  |                 { | ||||||
|  |                 // A user-friendly name for this environment | ||||||
|  |                 name = "$JB_NAME" | ||||||
|  | 
 | ||||||
|  |                 // A list of XMPP server hosts to which we'll connect | ||||||
|  |                 xmpp-server-hosts = [ "$MAIN_SRV_DOMAIN" ] | ||||||
|  | 
 | ||||||
|  |                 // The base XMPP domain | ||||||
|  |                 xmpp-domain = "$MAIN_SRV_DOMAIN" | ||||||
|  | 
 | ||||||
|  |                 // The MUC we'll join to announce our presence for | ||||||
|  |                 // recording and streaming services | ||||||
|  |                 control-muc { | ||||||
|  |                     domain = "internal.auth.$MAIN_SRV_DOMAIN" | ||||||
|  |                     room-name = "$JibriBrewery" | ||||||
|  |                     nickname = "machine-id" | ||||||
|  |                 } | ||||||
|  | 
 | ||||||
|  |                 // The login information for the control MUC | ||||||
|  |                 control-login { | ||||||
|  |                     domain = "auth.$MAIN_SRV_DOMAIN" | ||||||
|  |                     username = "jibri" | ||||||
|  |                     password = "$JB_AUTH_PASS" | ||||||
|  |                 } | ||||||
|  | 
 | ||||||
|  |                 // An (optional) MUC configuration where we'll | ||||||
|  |                 // join to announce SIP gateway services | ||||||
|  |             //    sip-control-muc { | ||||||
|  |             //        domain = "domain" | ||||||
|  |             //        room-name = "room-name" | ||||||
|  |             //        nickname = "nickname" | ||||||
|  |             //    } | ||||||
|  | 
 | ||||||
|  |                 // The login information the selenium web client will use | ||||||
|  |                 call-login { | ||||||
|  |                     domain = "recorder.$MAIN_SRV_DOMAIN" | ||||||
|  |                     username = "recorder" | ||||||
|  |                     password = "$JB_REC_PASS" | ||||||
|  |                 } | ||||||
|  | 
 | ||||||
|  |                 // The value we'll strip from the room JID domain to derive | ||||||
|  |                 // the call URL | ||||||
|  |                 strip-from-room-domain = "conference." | ||||||
|  | 
 | ||||||
|  |                 // How long Jibri sessions will be allowed to last before | ||||||
|  |                 // they are stopped.  A value of 0 allows them to go on | ||||||
|  |                 // indefinitely | ||||||
|  |                 usage-timeout = 0 hour | ||||||
|  | 
 | ||||||
|  |                 // Whether or not we'll automatically trust any cert on | ||||||
|  |                 // this XMPP domain | ||||||
|  |                 trust-all-xmpp-certs = true | ||||||
|  |                 } | ||||||
|  |             ] | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | NEW_CONF | ||||||
| 
 | 
 | ||||||
| #Jibri xorg resolution | #Jibri xorg resolution | ||||||
| sed -i "s|[[:space:]]Virtual .*|Virtual $JIBRI_RES_XORG_CONF|" "$JIBRI_XORG_CONF" | sed -i "s|[[:space:]]Virtual .*|Virtual $JIBRI_RES_XORG_CONF|" "$JIBRI_XORG_CONF" | ||||||
|  | @ -362,20 +467,16 @@ echo "$NJN_USER:$NJN_USER_PASS" | chpasswd | ||||||
| 
 | 
 | ||||||
| echo -e "\n---- We'll connect to main server ----" | echo -e "\n---- We'll connect to main server ----" | ||||||
| read -n 1 -s -r -p "Press any key to continue..."$'\n' | read -n 1 -s -r -p "Press any key to continue..."$'\n' | ||||||
| sudo su "$NJN_USER" -c "ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -o -a 200 -q -N ''" | sudo su "$NJN_USER" -c "ssh-keygen -t rsa -f ~/.ssh/id_rsa -b 4096 -o -a 100 -q -N ''" | ||||||
| 
 | 
 | ||||||
| install -m 0600 -o jibri /home/"$NJN_USER"/.ssh/id_ed25519 /home/jibri/jbsync.pem | #Workaround for jibri to do cleaning. | ||||||
|  | install -m 0600 -o jibri /home/"$NJN_USER"/.ssh/id_rsa /home/jibri/jbsync.pem | ||||||
| sudo su jibri -c "install -D /dev/null /home/jibri/.ssh/known_hosts" | sudo su jibri -c "install -D /dev/null /home/jibri/.ssh/known_hosts" | ||||||
| sudo su jibri -c "ssh-keyscan -t rsa $MAIN_SRV_DOMAIN >> /home/jibri/.ssh/known_hosts" | sudo su jibri -c "ssh-keyscan -t rsa $MAIN_SRV_DOMAIN >> /home/jibri/.ssh/known_hosts" | ||||||
| sudo su jibri -c "ssh-keyscan -t ed25519 $MAIN_SRV_DOMAIN >> /home/jibri/.ssh/known_hosts" |  | ||||||
| 
 | 
 | ||||||
| echo -e "\n\n##################\nRemote pass: $MJS_USER_PASS\n################## \n\n" | echo -e "\n\n##################\nRemote pass: $MJS_USER_PASS\n################## \n\n" | ||||||
| ssh-keyscan -t rsa "$MAIN_SRV_DOMAIN" >> ~/.ssh/known_hosts | ssh-keyscan -t rsa "$MAIN_SRV_DOMAIN" >> ~/.ssh/known_hosts | ||||||
| ssh-keyscan -t ed25519 "$MAIN_SRV_DOMAIN" >> ~/.ssh/known_hosts | ssh "$MJS_USER"@"$MAIN_SRV_DOMAIN" sh -c "'cat >> .ssh/authorized_keys'" < /home/"$NJN_USER"/.ssh/id_rsa.pub | ||||||
| [ -f /home/"$NJN_USER"/.ssh/id_rsa.pub ] && \ |  | ||||||
|     ssh "$MJS_USER"@"$MAIN_SRV_DOMAIN" sh -c "'cat >> .ssh/authorized_keys'" < /home/"$NJN_USER"/.ssh/id_rsa.pub |  | ||||||
| [ -f /home/"$NJN_USER"/.ssh/id_ed25519.pub ] && \ |  | ||||||
|     ssh "$MJS_USER"@"$MAIN_SRV_DOMAIN" sh -c "'cat >> .ssh/authorized_keys'" < /home/"$NJN_USER"/.ssh/id_ed25519.pub |  | ||||||
| sudo su "$NJN_USER" -c "ssh-keyscan -t rsa $MAIN_SRV_DOMAIN >> /home/$NJN_USER/.ssh/known_hosts" | sudo su "$NJN_USER" -c "ssh-keyscan -t rsa $MAIN_SRV_DOMAIN >> /home/$NJN_USER/.ssh/known_hosts" | ||||||
| 
 | 
 | ||||||
| echo -e "\n---- Setup Log system ----" | echo -e "\n---- Setup Log system ----" | ||||||
|  | @ -390,7 +491,7 @@ exec 1>/var/log/"$NJN_USER"/remote_jnsync.log 2>&1 | ||||||
| # Run sync | # Run sync | ||||||
| while true; do | while true; do | ||||||
|   inotifywait  -t 60 -r -e modify,attrib,close_write,move,delete "$DIR_RECORD" |   inotifywait  -t 60 -r -e modify,attrib,close_write,move,delete "$DIR_RECORD" | ||||||
|   sudo su "$NJN_USER" -c "rsync -Aax --chmod=Dg+rwx,Fg+rw --info=progress2 --remove-source-files --exclude '.*/' $DIR_RECORD/ $MJS_USER@$MAIN_SRV_DOMAIN:$DIR_RECORD" |   sudo su "$NJN_USER" -c "rsync -Aax  --info=progress2 --remove-source-files --exclude '.*/' $DIR_RECORD/ $MJS_USER@$MAIN_SRV_DOMAIN:$DIR_RECORD" | ||||||
|   find "$DIR_RECORD" -depth -type d -empty -not -path "$DIR_RECORD" -delete |   find "$DIR_RECORD" -depth -type d -empty -not -path "$DIR_RECORD" -delete | ||||||
| done | done | ||||||
| INOT_RSYNC | INOT_RSYNC | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # JVB2 Node Aggregator | # JVB2 Node Aggregator | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| ### 0_LAST EDITION TIME STAMP ### | ### 0_LAST EDITION TIME STAMP ### | ||||||
|  | @ -16,13 +16,9 @@ do | ||||||
| 	esac | 	esac | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
|  | #DEBUG | ||||||
| if [ "$MODE" = "debug" ]; then | if [ "$MODE" = "debug" ]; then | ||||||
|     set -x | set -x | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| if ! [ "$(id -u)" = 0 ]; then |  | ||||||
|    echo "You need to be root or have sudo privileges!" |  | ||||||
|    exit 0 |  | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| #Make sure the file name is the required one | #Make sure the file name is the required one | ||||||
|  | @ -32,6 +28,13 @@ if [ ! "$(basename "$0")" = "add-jvb2-node.sh" ]; then | ||||||
|     exit |     exit | ||||||
| fi | 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 | ### 0_VAR_DEF | ||||||
| MAIN_SRV_DIST=TBD | MAIN_SRV_DIST=TBD | ||||||
| MAIN_SRV_REPO=TBD | MAIN_SRV_REPO=TBD | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Etherpad Installer for Jitsi Meet | # Etherpad Installer for Jitsi Meet | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # | # | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
|  | @ -13,8 +13,9 @@ do | ||||||
| 	esac | 	esac | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
|  | #DEBUG | ||||||
| if [ "$MODE" = "debug" ]; then | if [ "$MODE" = "debug" ]; then | ||||||
|     set -x | set -x | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| if ! [ "$(id -u)" = 0 ]; then | if ! [ "$(id -u)" = 0 ]; then | ||||||
|  | @ -31,9 +32,7 @@ echo ' | ||||||
| ' | ' | ||||||
| FORGE_REPO="https://forge.switnet.net/switnet/quick-jibri-installer" | FORGE_REPO="https://forge.switnet.net/switnet/quick-jibri-installer" | ||||||
| check_apt_policy() { | check_apt_policy() { | ||||||
|     apt-cache policy 2>/dev/null| \ | apt-cache policy 2>/dev/null| awk "/$1/{print \$3}" | awk -F '/' 'NR==1{print$2}' | ||||||
|     awk "/$1/{print \$3}" | \ |  | ||||||
|     awk -F '/' 'NR==1{print$2}' |  | ||||||
| } | } | ||||||
| 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 | ||||||
|  | @ -60,26 +59,28 @@ PSGVER="$(apt-cache madison postgresql|tr -d '[:blank:]'|awk -F'[|+]' 'NR==1{pri | ||||||
| ETHERPAD_DB_USER="dockerpad" | ETHERPAD_DB_USER="dockerpad" | ||||||
| ETHERPAD_DB_NAME="etherpad" | ETHERPAD_DB_NAME="etherpad" | ||||||
| ETHERPAD_DB_PASS="$(tr -dc "a-zA-Z0-9#*=" < /dev/urandom | fold -w 10 | head -n1)" | ETHERPAD_DB_PASS="$(tr -dc "a-zA-Z0-9#*=" < /dev/urandom | fold -w 10 | head -n1)" | ||||||
|  | DOCKER_CE_REPO="$(check_apt_policy docker)" | ||||||
| WS_CONF_MATCH1="# ensure all static content can always be found first" | WS_CONF_MATCH1="# ensure all static content can always be found first" | ||||||
| WS_MATCH2="upstream prosody {" | 
 | ||||||
|  | echo "Add Docker repo" | ||||||
|  | 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 | \ | ||||||
|  |     gpg --dearmor | tee /etc/apt/trusted.gpg.d/docker-gpg-key.gpg  >/dev/null | ||||||
|  |     apt -q2 update | ||||||
|  | fi | ||||||
| 
 | 
 | ||||||
| read -p "Set your etherpad docker admin password: " -r ETHERPAD_ADMIN_PASS | read -p "Set your etherpad docker admin password: " -r ETHERPAD_ADMIN_PASS | ||||||
| 
 | 
 | ||||||
| install -m 600 /dev/null /var/opt/etherpad_details.txt |  | ||||||
| cat << EOF > /var/opt/etherpad_details.txt |  | ||||||
| ETHERPAD_ADMIN_PASS=$ETHERPAD_ADMIN_PASS |  | ||||||
| ETHERPAD_DB_USER=$ETHERPAD_DB_USER |  | ||||||
| ETHERPAD_DB_NAME=$ETHERPAD_DB_NAME |  | ||||||
| ETHERPAD_DB_PASS=$ETHERPAD_DB_PASS |  | ||||||
| EOF |  | ||||||
| 
 |  | ||||||
| # Make sure we can rely on the match strings. | # Make sure we can rely on the match strings. | ||||||
| printf "> Testing match strings on config files.\n" | printf "> Testing match strings on config files.\n" | ||||||
| test_match "$WS_MATCH1" "$WS_CONF" | test_match "$WS_MATCH1" "$WS_CONF" | ||||||
| test_match "$WS_MATCH2" "$WS_CONF" |  | ||||||
| 
 | 
 | ||||||
| # Install required packages | # Install required packages | ||||||
| install_ifnot docker.io | install_ifnot docker-ce | ||||||
| install_ifnot postgresql-"$PSGVER" | install_ifnot postgresql-"$PSGVER" | ||||||
| 
 | 
 | ||||||
| # Create DB | # Create DB | ||||||
|  | @ -88,15 +89,15 @@ sudo -u postgres psql <<DB | ||||||
| CREATE DATABASE ${ETHERPAD_DB_NAME}; | CREATE DATABASE ${ETHERPAD_DB_NAME}; | ||||||
| CREATE USER ${ETHERPAD_DB_USER} WITH ENCRYPTED PASSWORD '${ETHERPAD_DB_PASS}'; | CREATE USER ${ETHERPAD_DB_USER} WITH ENCRYPTED PASSWORD '${ETHERPAD_DB_PASS}'; | ||||||
| GRANT ALL PRIVILEGES ON DATABASE ${ETHERPAD_DB_NAME} TO ${ETHERPAD_DB_USER}; | GRANT ALL PRIVILEGES ON DATABASE ${ETHERPAD_DB_NAME} TO ${ETHERPAD_DB_USER}; | ||||||
| \c ${ETHERPAD_DB_NAME} |  | ||||||
| ALTER SCHEMA public OWNER TO ${ETHERPAD_DB_USER}; |  | ||||||
| DB | DB | ||||||
|  | echo "  -- Your etherpad db password is: $ETHERPAD_DB_PASS" | ||||||
|  | echo -e "     Please save it somewhere safe.\n" | ||||||
| 
 | 
 | ||||||
| # Check fot docker if not running then execute | # Check fot docker if not running then execute | ||||||
| if [ ! "$(docker ps -q -f name=etherpad)" ]; then | if [ ! "$(docker ps -q -f name=etherpad)" ]; then | ||||||
|     if [ "$(docker ps -aq -f status=exited -f name=etherpad)" ]; then |     if [ "$(docker ps -aq -f status=exited -f name=etherpad)" ]; then | ||||||
|         # cleanup |         # cleanup | ||||||
|         docker rm -f etherpad |         docker rm etherpad | ||||||
|     fi |     fi | ||||||
|     # run your container |     # run your container | ||||||
|     docker run -d --restart always \ |     docker run -d --restart always \ | ||||||
|  | @ -110,7 +111,7 @@ if [ ! "$(docker ps -q -f name=etherpad)" ]; then | ||||||
|     -e "DB_NAME=$ETHERPAD_DB_NAME"   \ |     -e "DB_NAME=$ETHERPAD_DB_NAME"   \ | ||||||
|     -e "DB_USER=$ETHERPAD_DB_USER" \ |     -e "DB_USER=$ETHERPAD_DB_USER" \ | ||||||
|     -e "DB_PASS=$ETHERPAD_DB_PASS" \ |     -e "DB_PASS=$ETHERPAD_DB_PASS" \ | ||||||
|     etherpad/etherpad |     -i -t etherpad/etherpad | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| # Tune webserver for Jitsi App control | # Tune webserver for Jitsi App control | ||||||
|  | @ -119,16 +120,6 @@ if [ "$(grep -c etherpad "$WS_CONF")" != 0 ]; then | ||||||
|     echo "> Webserver seems configured, skipping..." |     echo "> Webserver seems configured, skipping..." | ||||||
| elif [ -f "$WS_CONF" ]; then | elif [ -f "$WS_CONF" ]; then | ||||||
|     echo "> Setting up webserver configuration file..." |     echo "> Setting up webserver configuration file..." | ||||||
|     if ! grep -q 'map $http_upgrade $connection_upgrade' "$WS_CONF"; then |  | ||||||
|         echo "  > Setting mapping upgrade connection." |  | ||||||
|         sed -i "/$WS_MATCH2/i # This is required to proxy Grafana Live WebSocket connections or Etherpad" "$WS_CONF" |  | ||||||
|         sed -i "/$WS_MATCH2/i map \$http_upgrade \$connection_upgrade {" "$WS_CONF" |  | ||||||
|         sed -i "/$WS_MATCH2/i \ \ default upgrade;" "$WS_CONF" |  | ||||||
|         sed -i "/$WS_MATCH2/i \ \ '' close;" "$WS_CONF" |  | ||||||
|         sed -i "/$WS_MATCH2/i }" "$WS_CONF" |  | ||||||
|     else |  | ||||||
|         echo "  > Upgrade connection mapping already setup." |  | ||||||
|     fi |  | ||||||
|     sed -i "/$WS_CONF_MATCH1/i \ \ \ \ #Etherpad block" "$WS_CONF" |     sed -i "/$WS_CONF_MATCH1/i \ \ \ \ #Etherpad block" "$WS_CONF" | ||||||
|     sed -i "/$WS_CONF_MATCH1/i \ \ \ \ location \^\~\ \/etherpad\/ {" "$WS_CONF" |     sed -i "/$WS_CONF_MATCH1/i \ \ \ \ location \^\~\ \/etherpad\/ {" "$WS_CONF" | ||||||
|     sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_http_version 1.1;" "$WS_CONF" |     sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_http_version 1.1;" "$WS_CONF" | ||||||
|  | @ -142,8 +133,8 @@ elif [ -f "$WS_CONF" ]; then | ||||||
|     sed -i "/$WS_CONF_MATCH1/i \ \ \ \ }" "$WS_CONF" |     sed -i "/$WS_CONF_MATCH1/i \ \ \ \ }" "$WS_CONF" | ||||||
|     sed -i "/$WS_CONF_MATCH1/i \\\n" "$WS_CONF" |     sed -i "/$WS_CONF_MATCH1/i \\\n" "$WS_CONF" | ||||||
| else | else | ||||||
|     echo "> No etherpad config done to server file, please report to:" |     echo "> No etherpad config done to server file, please report to: | ||||||
|     echo "    -> https://forge.switnet.net/switnet/quick-jibri-installer/issues" |     -> https://forge.switnet.net/switnet/quick-jibri-installer/issues" | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| # Configure config.js | # Configure config.js | ||||||
|  | @ -161,6 +152,6 @@ if nginx -t 2>/dev/null ; then | ||||||
| #    systemctl reload nginx | #    systemctl reload nginx | ||||||
| else | else | ||||||
|     echo "Please check your configuration, something may be wrong." |     echo "Please check your configuration, something may be wrong." | ||||||
|     echo "Will not try to enable etherpad nginx configuration, please report to:" |     echo "Will not try to enable etherpad nginx configuration, please report to: | ||||||
|     echo "    -> https://forge.switnet.net/switnet/quick-jibri-installer/issues" |     -> https://forge.switnet.net/switnet/quick-jibri-installer/issues" | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | @ -4,27 +4,9 @@ | ||||||
| # Based on: | # Based on: | ||||||
| # - https://community.jitsi.org/t/118883 | # - https://community.jitsi.org/t/118883 | ||||||
| # | # | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option |  | ||||||
| do |  | ||||||
| 	case "${option}" |  | ||||||
| 	in |  | ||||||
| 		m) MODE=${OPTARG};; |  | ||||||
| 		\?) echo "Usage: sudo bash ./$0 [-m debug]" && exit;; |  | ||||||
| 	esac |  | ||||||
| done |  | ||||||
| 
 |  | ||||||
| if [ "$MODE" = "debug" ]; then |  | ||||||
|     set -x |  | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| if ! [ "$(id -u)" = 0 ]; then |  | ||||||
|    echo "You need to be root or have sudo privileges!" |  | ||||||
|    exit 0 |  | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| # Reset | # Reset | ||||||
| Color_Off='\e[0m'       # Text Reset | Color_Off='\e[0m'       # Text Reset | ||||||
| # Regular Colors | # Regular Colors | ||||||
|  | @ -70,6 +52,24 @@ else | ||||||
| fi | fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | while getopts m: option | ||||||
|  | do | ||||||
|  | 	case "${option}" | ||||||
|  | 	in | ||||||
|  | 		m) MODE=${OPTARG};; | ||||||
|  | 		\?) echo "Usage: sudo bash ./$0 [-m debug]" && exit;; | ||||||
|  | 	esac | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | #DEBUG | ||||||
|  | if [ "$MODE" = "debug" ]; then | ||||||
|  | set -x | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | if ! [ "$(id -u)" = 0 ]; then | ||||||
|  |    echo "You need to be root or have sudo privileges!" | ||||||
|  |    exit 0 | ||||||
|  | fi | ||||||
| clear | clear | ||||||
| echo -e '\n | echo -e '\n | ||||||
| ######################################################################## | ######################################################################## | ||||||
|  |  | ||||||
							
								
								
									
										14
									
								
								grafana.sh
								
								
								
								
							
							
						
						
									
										14
									
								
								grafana.sh
								
								
								
								
							|  | @ -8,7 +8,7 @@ | ||||||
| # by "mephisto" | # by "mephisto" | ||||||
| # | # | ||||||
| # Igor Kerstges © - 2021 | # Igor Kerstges © - 2021 | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # | # | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
|  | @ -21,8 +21,9 @@ do | ||||||
| 	esac | 	esac | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
|  | #DEBUG | ||||||
| if [ "$MODE" = "debug" ]; then | if [ "$MODE" = "debug" ]; then | ||||||
|     set -x | set -x | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| if ! [ "$(id -u)" = 0 ]; then | if ! [ "$(id -u)" = 0 ]; then | ||||||
|  | @ -179,7 +180,6 @@ while [ $secs -gt 0 ]; do | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
| if [ -f "$WS_CONF" ]; then | if [ -f "$WS_CONF" ]; then | ||||||
|     echo "> Setting up webserver configuration file..." |  | ||||||
|     sed -i "/$WS_MATCH1/i \ \ \ \ # Proxy Grafana." "$WS_CONF" |     sed -i "/$WS_MATCH1/i \ \ \ \ # Proxy Grafana." "$WS_CONF" | ||||||
|     sed -i "/$WS_MATCH1/i \ \ \ \ location ~ ^/(grafana/|grafana/login) {" "$WS_CONF" |     sed -i "/$WS_MATCH1/i \ \ \ \ location ~ ^/(grafana/|grafana/login) {" "$WS_CONF" | ||||||
|     sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF" |     sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF" | ||||||
|  | @ -194,16 +194,12 @@ if [ -f "$WS_CONF" ]; then | ||||||
|     sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF" |     sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF" | ||||||
|     sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_pass http://grafana;" "$WS_CONF" |     sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_pass http://grafana;" "$WS_CONF" | ||||||
|     sed -i "/$WS_MATCH1/i \ \ \ \ }" "$WS_CONF" |     sed -i "/$WS_MATCH1/i \ \ \ \ }" "$WS_CONF" | ||||||
|     if ! grep -q 'map $http_upgrade $connection_upgrade' "$WS_CONF"; then | 
 | ||||||
|         echo "  > Setting mapping upgrade connection." |     sed -i "/$WS_MATCH2/i # This is required to proxy Grafana Live WebSocket connections." "$WS_CONF" | ||||||
|         sed -i "/$WS_MATCH2/i # This is required to proxy Grafana Live WebSocket connections or Etherpad" "$WS_CONF" |  | ||||||
|     sed -i "/$WS_MATCH2/i map \$http_upgrade \$connection_upgrade {" "$WS_CONF" |     sed -i "/$WS_MATCH2/i map \$http_upgrade \$connection_upgrade {" "$WS_CONF" | ||||||
|     sed -i "/$WS_MATCH2/i \ \ default upgrade;" "$WS_CONF" |     sed -i "/$WS_MATCH2/i \ \ default upgrade;" "$WS_CONF" | ||||||
|     sed -i "/$WS_MATCH2/i \ \ '' close;" "$WS_CONF" |     sed -i "/$WS_MATCH2/i \ \ '' close;" "$WS_CONF" | ||||||
|     sed -i "/$WS_MATCH2/i }" "$WS_CONF" |     sed -i "/$WS_MATCH2/i }" "$WS_CONF" | ||||||
|     else |  | ||||||
|         echo "  > Upgrade connection mapping already setup." |  | ||||||
|     fi |  | ||||||
|     sed -i "/$WS_MATCH1/i \\\n" "$WS_CONF" |     sed -i "/$WS_MATCH1/i \\\n" "$WS_CONF" | ||||||
|     sed -i "/$WS_MATCH2/i upstream grafana {" "$WS_CONF" |     sed -i "/$WS_MATCH2/i upstream grafana {" "$WS_CONF" | ||||||
|     sed -i "/$WS_MATCH2/i \ \ server localhost:3000;" "$WS_CONF" |     sed -i "/$WS_MATCH2/i \ \ server localhost:3000;" "$WS_CONF" | ||||||
|  |  | ||||||
|  | @ -1,26 +1,13 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Quick Jigasi Installer with VOSK backend - *buntu (LTS) based systems. | # Quick Jigasi Installer with VOSK backend - *buntu (LTS) based systems. | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | #Check if user is root | ||||||
| do |  | ||||||
| 	case "${option}" |  | ||||||
| 	in |  | ||||||
| 		m) MODE=${OPTARG};; |  | ||||||
| 		\?) echo "Usage: sudo bash ./$0 [-m debug]" && exit;; |  | ||||||
| 	esac |  | ||||||
| done |  | ||||||
| 
 |  | ||||||
| if [ "$MODE" = "debug" ]; then |  | ||||||
|     set -x |  | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| if ! [ "$(id -u)" = 0 ]; then | if ! [ "$(id -u)" = 0 ]; then | ||||||
|    echo "You need to be root or have sudo privileges!" |    echo "You need to be root or have sudo privileges!" | ||||||
|    exit 0 |    exit 0 | ||||||
| fi | fi | ||||||
| 
 |  | ||||||
| exit_if_not_installed() { | exit_if_not_installed() { | ||||||
| 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 " This instance doesn't have $1 installed, exiting..." |     echo " This instance doesn't have $1 installed, exiting..." | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Jitsi Meet recurring upgrader and customization keeper | # Jitsi Meet recurring upgrader and customization keeper | ||||||
| # for Debian/*buntu binaries. | # for Debian/*buntu binaries. | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GNU GPLv3 or later. | # GNU GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  | @ -13,13 +13,9 @@ do | ||||||
| 	esac | 	esac | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
|  | #DEBUG | ||||||
| if [ "$MODE" = "debug" ]; then | if [ "$MODE" = "debug" ]; then | ||||||
|     set -x | set -x | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| if ! [ "$(id -u)" = 0 ]; then |  | ||||||
|    echo "You need to be root or have sudo privileges!" |  | ||||||
|    exit 0 |  | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| Blue='\e[0;34m' | Blue='\e[0;34m' | ||||||
|  | @ -31,7 +27,11 @@ Color_Off='\e[0m' | ||||||
| printwc() { | printwc() { | ||||||
|     printf "%b$2%b" "$1" "${Color_Off}" |     printf "%b$2%b" "$1" "${Color_Off}" | ||||||
| } | } | ||||||
| 
 | #Check if user is root | ||||||
|  | if ! [ "$(id -u)" = 0 ]; then | ||||||
|  |    echo "You need to be root or have sudo privileges!" | ||||||
|  |    exit 0 | ||||||
|  | fi | ||||||
| if [ ! -f jm-bm.sh ]; then | if [ ! -f jm-bm.sh ]; then | ||||||
|     echo "Please check that you are running the jitsi updater while being on the project folder" |     echo "Please check that you are running the jitsi updater while being on the project folder" | ||||||
|     echo "other wise the updater might have errors or be incomplete. Exiting..." |     echo "other wise the updater might have errors or be incomplete. Exiting..." | ||||||
|  | @ -62,7 +62,8 @@ fi | ||||||
| INT_CONF="/usr/share/jitsi-meet/interface_config.js" | INT_CONF="/usr/share/jitsi-meet/interface_config.js" | ||||||
| INT_CONF_ETC="/etc/jitsi/meet/$DOMAIN-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}' | xargs) |                               sort -u | awk '{print $2}' | sed '/jigasi/d' | \ | ||||||
|  |                               xargs) | ||||||
| AVATAR="$(grep -r avatar /etc/nginx/sites-*/ 2>/dev/null)" | AVATAR="$(grep -r avatar /etc/nginx/sites-*/ 2>/dev/null)" | ||||||
| if [ -f "$apt_repo"/google-chrome.list ]; then | 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 | \ | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								jm-bm.sh
								
								
								
								
							
							
						
						
									
										10
									
								
								jm-bm.sh
								
								
								
								
							|  | @ -1,7 +1,7 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Jitsi Meet brandless mode | # Jitsi Meet brandless mode | ||||||
| # for Debian/*buntu binaries. | # for Debian/*buntu binaries. | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GNU GPLv3 or later. | # GNU GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  | @ -13,13 +13,9 @@ do | ||||||
| 	esac | 	esac | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
|  | #DEBUG | ||||||
| if [ "$MODE" = "debug" ]; then | if [ "$MODE" = "debug" ]; then | ||||||
|     set -x | set -x | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| if ! [ "$(id -u)" = 0 ]; then |  | ||||||
|    echo "You need to be root or have sudo privileges!" |  | ||||||
|    exit 0 |  | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)" | DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)" | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # JRA (Jibri Recordings Access) via Nextcloud | # JRA (Jibri Recordings Access) via Nextcloud | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  | @ -12,6 +12,7 @@ do | ||||||
| 	esac | 	esac | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
|  | #DEBUG | ||||||
| if [ "$MODE" = "debug" ]; then | if [ "$MODE" = "debug" ]; then | ||||||
|     set -x |     set -x | ||||||
| fi | fi | ||||||
|  | @ -20,7 +21,6 @@ if ! [ "$(id -u)" = 0 ]; then | ||||||
|    echo "You need to be root or have sudo privileges!" |    echo "You need to be root or have sudo privileges!" | ||||||
|    exit 0 |    exit 0 | ||||||
| fi | fi | ||||||
| 
 |  | ||||||
| exit_if_not_installed() { | exit_if_not_installed() { | ||||||
| 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 " This instance doesn't have $1 installed, exiting..." |     echo " This instance doesn't have $1 installed, exiting..." | ||||||
|  | @ -59,7 +59,7 @@ DIR_RECORD="$(awk  -F '"' '/RECORDING/{print$2}'  /home/jibri/finalize_recording | ||||||
| REDIS_CONF="/etc/redis/redis.conf" | REDIS_CONF="/etc/redis/redis.conf" | ||||||
| JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf" | JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf" | ||||||
| [ -f "$JITSI_MEET_PROXY" ] && PREAD_PROXY=$(grep -nr "preread_server_name" "$JITSI_MEET_PROXY" | cut -d ":" -f1) | [ -f "$JITSI_MEET_PROXY" ] && PREAD_PROXY=$(grep -nr "preread_server_name" "$JITSI_MEET_PROXY" | cut -d ":" -f1) | ||||||
| PUBLIC_IP="$(wget -qO- https://api.ipify.org)" | PUBLIC_IP="$(dig -4 +short myip.opendns.com @resolver1.opendns.com)" | ||||||
| ISO3166_CODE=TBD | ISO3166_CODE=TBD | ||||||
| NL="$(printf '\n  ')" | NL="$(printf '\n  ')" | ||||||
| 
 | 
 | ||||||
|  | @ -132,10 +132,9 @@ sleep .1 | ||||||
| #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) [default: 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\" or leave empty |   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/$NL" -r ENABLE_HSTS |   in case you don't know what you are doing. More at https://hstspreload.org/$NL" -r ENABLE_HSTS | ||||||
|     ENABLE_HSTS=${ENABLE_HSTS:-no} |  | ||||||
|     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 | ||||||
|  | @ -164,7 +163,7 @@ if [ "$(dpkg-query -W -f='${Status}' jibri 2>/dev/null | grep -c "ok installed") | ||||||
|     echo "jitsi meet/jibri is installed, checking version:" |     echo "jitsi meet/jibri is installed, checking version:" | ||||||
|     apt-show-versions jibri |     apt-show-versions jibri | ||||||
| else | else | ||||||
|     echo "Wait!, jitsi-meet/jibri is not installed on this system via apt, exiting..." |     echo "Wait!, jitsi-meet/jibri is not installed on this system using apt, exiting..." | ||||||
|     exit |     exit | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|  | @ -197,10 +196,7 @@ sudo -u postgres psql <<DB | ||||||
| CREATE DATABASE nextcloud_db; | CREATE DATABASE nextcloud_db; | ||||||
| CREATE USER ${NC_DB_USER} WITH ENCRYPTED PASSWORD '${NC_DB_PASSWD}'; | CREATE USER ${NC_DB_USER} WITH ENCRYPTED PASSWORD '${NC_DB_PASSWD}'; | ||||||
| GRANT ALL PRIVILEGES ON DATABASE ${NC_DB} TO ${NC_DB_USER}; | GRANT ALL PRIVILEGES ON DATABASE ${NC_DB} TO ${NC_DB_USER}; | ||||||
| \c nextcloud_db |  | ||||||
| ALTER SCHEMA public OWNER TO ${NC_DB_USER}; |  | ||||||
| DB | DB | ||||||
| 
 |  | ||||||
| echo -e "\nDone!\n" | echo -e "\nDone!\n" | ||||||
| 
 | 
 | ||||||
| # Add .mjs as a file extension for javascript | # Add .mjs as a file extension for javascript | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Custom High Performance Jitsi conf | # Custom High Performance Jitsi conf | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Custom Selenium Grid-Node fro Jitsi Meet | # Custom Selenium Grid-Node fro Jitsi Meet | ||||||
| # Pandian © - https://community.jitsi.org/u/Pandian | # Pandian © - https://community.jitsi.org/u/Pandian | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
| # System-tune-up to remove system software restrictions on a huge load of connections. | # System-tune-up to remove system software restrictions on a huge load of connections. | ||||||
| # Be aware that hardware/infrastructure resources are the most common limiters. | # Be aware that hardware/infrastructure resources are the most common limiters. | ||||||
| # | # | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # JWT Mode Setup | # JWT Mode Setup | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| # Quick Jigasi Installer with VOSK backend - *buntu (LTS) based systems. | # Quick Jigasi Installer with VOSK backend - *buntu (LTS) based systems. | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| Enable transcription on jitsi meet config.js file. | Enable transcription on jitsi meet config.js file. | ||||||
|  | @ -29,10 +29,10 @@ index f412891..f704157 100644 | ||||||
|   |   | ||||||
|      //     // Transcriber language. This settings will only work if "useAppLanguage" |      //     // Transcriber language. This settings will only work if "useAppLanguage" | ||||||
|      //     // is explicitly set to false. |      //     // is explicitly set to false. | ||||||
| @@ -484,7 +484,7 @@ var config = {
 | @@ -453,7 +453,7 @@ var config = {
 | ||||||
|      //     // Enables automatic request of subtitles when transcriber is present in the meeting, uses the default |   | ||||||
|      //     // language that is set |      //     // Enables automatic turning on transcribing when recording is started | ||||||
|      //     autoCaptionOnTranscribe: false, |      //     autoTranscribeOnRecord: false, | ||||||
| -    // },
 | -    // },
 | ||||||
| +    },
 | +    },
 | ||||||
|   |   | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| # Quick Jigasi Installer with VOSK backend - *buntu (LTS) based systems. | # Quick Jigasi Installer with VOSK backend - *buntu (LTS) based systems. | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| Modify sip-communicator.properties to run Jigasi along with VOSK Models. | Modify sip-communicator.properties to run Jigasi along with VOSK Models. | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| # Quick Jibri Installer - *buntu (LTS) based systems. | # Quick Jibri Installer - *buntu (LTS) based systems. | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| Patch jitsi-meet config.js to enable recording and livestreaming by default. | Patch jitsi-meet config.js to enable recording and livestreaming by default. | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| # Quick Jibri Installer - *buntu (LTS) based systems. | # Quick Jibri Installer - *buntu (LTS) based systems. | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| Patch jitsi-meet config.js to enable/disable welcome page. | Patch jitsi-meet config.js to enable/disable welcome page. | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Quick Jibri Installer - *buntu (LTS) based systems. | # Quick Jibri Installer - *buntu (LTS) based systems. | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| { | { | ||||||
| echo "Started at $(date +'%Y-%m-%d %H:%M:%S')" >> qj-installer.log | echo "Started at $(date +'%Y-%m-%d %H:%M:%S')" >> qj-installer.log | ||||||
|  | @ -14,8 +14,8 @@ do | ||||||
| 	esac | 	esac | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
|  | #DEBUG | ||||||
| if [ "$MODE" = "debug" ]; then | if [ "$MODE" = "debug" ]; then | ||||||
|     export MODE=debug |  | ||||||
|     set -x |     set -x | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|  | @ -38,7 +38,7 @@ DIST=$(lsb_release -sc) | ||||||
| GOOGL_REPO="/etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list" | GOOGL_REPO="/etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list" | ||||||
| GOOGLE_ACTIVE_REPO=$(apt-cache policy | awk '/chrome/{print$3}' | awk -F "/" 'NR==1{print$2}') | 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}')" | PROSODY_REPO="$(apt-cache policy | awk '/prosody/{print$3}' | awk -F "/" 'NR==1{print$2}')" | ||||||
| PUBLIC_IP="$(wget -qO- https://api.ipify.org)" | PUBLIC_IP="$(dig -4 +short myip.opendns.com @resolver1.opendns.com)" | ||||||
| NL="$(printf '\n  ')" | NL="$(printf '\n  ')" | ||||||
| NODEJS_VER="18" | NODEJS_VER="18" | ||||||
| JITSI_GPG_KEY="/etc/apt/trusted.gpg.d/jitsi-key.gpg.key" | JITSI_GPG_KEY="/etc/apt/trusted.gpg.d/jitsi-key.gpg.key" | ||||||
|  | @ -70,7 +70,6 @@ rename_distro() { | ||||||
| #Trisquel distro upstream referencing. | #Trisquel distro upstream referencing. | ||||||
| rename_distro nabia  focal | rename_distro nabia  focal | ||||||
| rename_distro aramo  jammy | rename_distro aramo  jammy | ||||||
| rename_distro ecne  noble |  | ||||||
| 
 | 
 | ||||||
| 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 | ||||||
|  | @ -117,6 +116,12 @@ check_snd_driver() { | ||||||
| var_dlim() { | var_dlim() { | ||||||
|     grep -n "$1" add-jibri-node.sh|head -n1|cut -d ":" -f1 |     grep -n "$1" add-jibri-node.sh|head -n1|cut -d ":" -f1 | ||||||
| } | } | ||||||
|  | add_gpg_keyring() { | ||||||
|  |     apt-key adv --recv-keys --keyserver keyserver.ubuntu.com \$1 | ||||||
|  |     apt-key export \$1 | gpg --dearmour | tee /tmp/\$1.gpg >/dev/null | ||||||
|  |     apt-key del \$1 | ||||||
|  |     mv /tmp/\$1.gpg /etc/apt/trusted.gpg.d/ | ||||||
|  | } | ||||||
| add_prosody_repo() { | add_prosody_repo() { | ||||||
|     echo "Add Prosody repo" |     echo "Add Prosody repo" | ||||||
|     if [ "$PROSODY_REPO" = "main" ]; then |     if [ "$PROSODY_REPO" = "main" ]; then | ||||||
|  | @ -184,8 +189,7 @@ fi | ||||||
| 
 | 
 | ||||||
|     printf "\nOS: %s" "$(lsb_release -sd)" |     printf "\nOS: %s" "$(lsb_release -sd)" | ||||||
| if [ "$DIST" = "focal" ] || \ | if [ "$DIST" = "focal" ] || \ | ||||||
|    [ "$DIST" = "jammy" ] || \ |    [ "$DIST" = "jammy" ]; then | ||||||
|    [ "$DIST" = "noble" ]; then |  | ||||||
|     printf "\nGood, this is a supported platform!" |     printf "\nGood, this is a supported platform!" | ||||||
| else | else | ||||||
|     printf "\nSorry, this platform is not supported... exiting" |     printf "\nSorry, this platform is not supported... exiting" | ||||||
|  | @ -303,12 +307,7 @@ do | ||||||
| done | done | ||||||
| sleep .1 | sleep .1 | ||||||
| #Prosody repository | #Prosody repository | ||||||
| if [ "$DIST" = "jammy" ]; then | add_prosody_repo | ||||||
|     add_prosody_repo |  | ||||||
|     prosody="prosody-0.12" |  | ||||||
| else |  | ||||||
|     prosody='prosody' |  | ||||||
| fi |  | ||||||
| sleep .1 | sleep .1 | ||||||
| # Jitsi-Meet Repo | # Jitsi-Meet Repo | ||||||
| printf "\nAdd Jitsi repo\n" | printf "\nAdd Jitsi repo\n" | ||||||
|  | @ -387,7 +386,7 @@ apt-get -y install \ | ||||||
|                     curl \ |                     curl \ | ||||||
|                     ffmpeg \ |                     ffmpeg \ | ||||||
|                     git \ |                     git \ | ||||||
|                     btop \ |                     htop \ | ||||||
|                     jq \ |                     jq \ | ||||||
|                     net-tools \ |                     net-tools \ | ||||||
|                     rsync \ |                     rsync \ | ||||||
|  | @ -405,7 +404,6 @@ apt-get -y install \ | ||||||
|     fi |     fi | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| ###FIXME: Trisquel support broken by lsb_release usage### |  | ||||||
| echo "# Check and Install HWE kernel if possible..." | echo "# Check and Install HWE kernel if possible..." | ||||||
| HWE_VIR_MOD="$(apt-cache madison linux-image-generic-hwe-"$(lsb_release -sr)" \ | HWE_VIR_MOD="$(apt-cache madison linux-image-generic-hwe-"$(lsb_release -sr)" \ | ||||||
|              2>/dev/null|head -n1|grep -c "hwe-$(lsb_release -sr)")" |              2>/dev/null|head -n1|grep -c "hwe-$(lsb_release -sr)")" | ||||||
|  | @ -421,9 +419,11 @@ fi | ||||||
| 
 | 
 | ||||||
| check_serv | check_serv | ||||||
| 
 | 
 | ||||||
|  | echo " | ||||||
| #-------------------------------------------------- | #-------------------------------------------------- | ||||||
| print_title "Install Jitsi Framework" | # Install Jitsi Framework | ||||||
| #-------------------------------------------------- | #-------------------------------------------------- | ||||||
|  | " | ||||||
| if [ "$LE_SSL" = "yes" ]; then | if [ "$LE_SSL" = "yes" ]; then | ||||||
|     echo "set jitsi-meet/cert-choice	select	$CERT_CHOICE_DEBCONF" \ |     echo "set jitsi-meet/cert-choice	select	$CERT_CHOICE_DEBCONF" \ | ||||||
|         | debconf-set-selections |         | debconf-set-selections | ||||||
|  | @ -437,7 +437,6 @@ echo "jitsi-meet-web-config	jitsi-meet/jaas-choice	boolean	false" \ | ||||||
| apt-get -y install \ | apt-get -y install \ | ||||||
|                 jitsi-meet \ |                 jitsi-meet \ | ||||||
|                 jibri \ |                 jibri \ | ||||||
|                 $prosody \ |  | ||||||
|                 openjdk-11-jre-headless |                 openjdk-11-jre-headless | ||||||
| 
 | 
 | ||||||
| # Fix RAND_load_file error | # Fix RAND_load_file error | ||||||
|  | @ -469,9 +468,7 @@ elif [ "$(npm list -g esprima 2>/dev/null | grep -c "esprima")" == "1" ]; then | ||||||
|     echo "Good. Esprima package is already installed" |     echo "Good. Esprima package is already installed" | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| #-------------------------------------------------- | echo "# Installing Google Chrome / ChromeDriver" | ||||||
| print_title "Installing Google Chrome / ChromeDriver" |  | ||||||
| #-------------------------------------------------- |  | ||||||
| if [ "$GOOGLE_ACTIVE_REPO" = "main" ]; then | if [ "$GOOGLE_ACTIVE_REPO" = "main" ]; then | ||||||
|     echo "Google repository already set." |     echo "Google repository already set." | ||||||
| else | else | ||||||
|  | @ -486,10 +483,7 @@ rm -rf "$GOOGL_REPO" | ||||||
| 
 | 
 | ||||||
| G_CHROME=$(apt-cache madison google-chrome-stable|awk '{print$3}'|cut -d. -f1-3) | G_CHROME=$(apt-cache madison google-chrome-stable|awk '{print$3}'|cut -d. -f1-3) | ||||||
| CHROMELAB_URL="https://googlechromelabs.github.io/chrome-for-testing" | CHROMELAB_URL="https://googlechromelabs.github.io/chrome-for-testing" | ||||||
| CHD_LTST_DWNL=$(curl -s $CHROMELAB_URL/known-good-versions-with-downloads.json | \ | CHD_LTST_DWNL=$(curl -s $CHROMELAB_URL/known-good-versions-with-downloads.json | jq -r ".versions[].downloads.chromedriver | select(. != null) | .[].url" | grep linux64 | grep "$G_CHROME" | tail -1) | ||||||
|                 jq -r ".versions[].downloads.chromedriver | \ |  | ||||||
|                 select(. != null) | .[].url" | grep linux64 | \ |  | ||||||
|                 grep "$G_CHROME" | tail -1) |  | ||||||
| CHD_LTST=$(awk -F '/' '{print$7}' <<< "$CHD_LTST_DWNL") | CHD_LTST=$(awk -F '/' '{print$7}' <<< "$CHD_LTST_DWNL") | ||||||
| GCMP_JSON="/etc/opt/chrome/policies/managed/managed_policies.json" | GCMP_JSON="/etc/opt/chrome/policies/managed/managed_policies.json" | ||||||
| 
 | 
 | ||||||
|  | @ -587,17 +581,15 @@ sleep .1 | ||||||
| read -p "Leave empty to use the default one (English):$NL" -r L10N_ME | read -p "Leave empty to use the default one (English):$NL" -r L10N_ME | ||||||
| 
 | 
 | ||||||
| #Drop unsecure TLS | #Drop unsecure TLS | ||||||
| if grep -qE 'TLSv1(\.1)?' /etc/nginx/nginx.conf; then | 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)$NL" -r DROP_TLS1 |     read -p "> Do you want to drop support for unsecure protocols TLSv1.0/1.1 now: (yes or no)$NL" -r DROP_TLS1 | ||||||
|     if [ "$DROP_TLS1" = "no" ]; then |     if [ "$DROP_TLS1" = "no" ]; then | ||||||
|         printf " - TLSv1.0/1.1 will remain.\n\n" |         printf " - TLSv1.0/1.1 will remain.\n\n" | ||||||
|     elif [ "$DROP_TLS1" = "yes" ]; then |     elif [ "$DROP_TLS1" = "yes" ]; then | ||||||
|         printf " - TLSv1.0/1.1 will be dropped\n\n" |         printf " - TLSv1.0/1.1 will be dropped\n\n" | ||||||
|     fi |     fi | ||||||
|     done | done | ||||||
| fi |  | ||||||
| sleep .1 | sleep .1 | ||||||
| #Brandless  Mode | #Brandless  Mode | ||||||
| while [ "$ENABLE_BLESSM" != "yes" ] && [ "$ENABLE_BLESSM" != "no" ] | while [ "$ENABLE_BLESSM" != "yes" ] && [ "$ENABLE_BLESSM" != "no" ] | ||||||
|  | @ -766,27 +758,7 @@ INT_CONF_ETC="/etc/jitsi/meet/$DOMAIN-interface_config.js" | ||||||
| ssl_wa() { | ssl_wa() { | ||||||
| if [ "$LE_SSL" = "yes" ]; then | if [ "$LE_SSL" = "yes" ]; then | ||||||
|   systemctl stop "$1" |   systemctl stop "$1" | ||||||
|   if certbot certonly --standalone --renew-by-default \ |   certbot certonly --standalone --renew-by-default --agree-tos --email "$5" -d "$6" --non-interactive | ||||||
|                       --agree-tos --email "$5" -d "$6" \ |  | ||||||
|                       --non-interactive |  | ||||||
|   then |  | ||||||
|     echo "> SSL cert issued correctly!" |  | ||||||
|   else |  | ||||||
|     echo "> SSL cert issued failed!" |  | ||||||
|     sleep .1 |  | ||||||
|     while [ "$SSL_FAILED" != "yes" ] && [ "$SSL_FAILED" != "no" ] |  | ||||||
|     do |  | ||||||
|         read -p "> Do you want to continue regardless? This might make the installer to fail later on: (yes or no)$NL" -r SSL_FAILED |  | ||||||
|         if [ "$SSL_FAILED" = "yes" ]; then |  | ||||||
|             printf " - Continuing installation regardless failure to retrieve SSL certs.\n\n" |  | ||||||
|         elif [ "$SSL_FAILED" = "no" ]; then |  | ||||||
|             printf " - Stoping the installer.You might want to take a look at:\n" |  | ||||||
|             printf "   - /var/log/letsencrypt/letsencrypt.log and / or\n" |  | ||||||
|             printf "   - https://letsencrypt.status.io/\n\n" |  | ||||||
|             exit 1 |  | ||||||
|         fi |  | ||||||
|     done |  | ||||||
|   fi |  | ||||||
|   sed -i "s|/etc/jitsi/meet/$3.crt|/etc/letsencrypt/live/$3/fullchain.pem|" "$4" |   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" |   sed -i "s|/etc/jitsi/meet/$3.key|/etc/letsencrypt/live/$3/privkey.pem|" "$4" | ||||||
|   systemctl restart "$1" |   systemctl restart "$1" | ||||||
|  | @ -822,9 +794,7 @@ restart_services() { | ||||||
| # Configure Jvb2 | # Configure Jvb2 | ||||||
| sed -i "/shard.HOSTNAME/s|localhost|$DOMAIN|" "$JVB2_SIP" | sed -i "/shard.HOSTNAME/s|localhost|$DOMAIN|" "$JVB2_SIP" | ||||||
| 
 | 
 | ||||||
| #-------------------------------------------------- | # Configure Jibri | ||||||
| print_title "Configure Jibri" |  | ||||||
| #-------------------------------------------------- |  | ||||||
| if [ "$ENABLE_SC" = "yes" ]; then | if [ "$ENABLE_SC" = "yes" ]; then | ||||||
|   if [ ! -f "$MOD_LIST_FILE" ]; then |   if [ ! -f "$MOD_LIST_FILE" ]; then | ||||||
|   printf "\n-> Adding external module to list prosody users...\n" |   printf "\n-> Adding external module to list prosody users...\n" | ||||||
|  | @ -885,8 +855,8 @@ BREWERY | ||||||
| sed -i "s|conference.$DOMAIN|internal.auth.$DOMAIN|" "$MEET_CONF" | sed -i "s|conference.$DOMAIN|internal.auth.$DOMAIN|" "$MEET_CONF" | ||||||
| 
 | 
 | ||||||
| #Enable recording & livestreaming by default. | #Enable recording & livestreaming by default. | ||||||
| echo -e "\n> Patching config.js to enable recording and livestreaming by default..." | echo "> Patching config.js to enable recording and livestreaming by default..." | ||||||
| echo -e "  Read more about patches at the patches folder.\n" | echo "  Read more about patches at the patches folder." | ||||||
| envsubst < \ | envsubst < \ | ||||||
|   patches/jitsi-meet/001-jitsi-meet-enable-livestreaming-and-recording.patch | \ |   patches/jitsi-meet/001-jitsi-meet-enable-livestreaming-and-recording.patch | \ | ||||||
|   patch --no-backup-if-mismatch -d / -p1 |   patch --no-backup-if-mismatch -d / -p1 | ||||||
|  | @ -942,11 +912,10 @@ useradd -m -g jibri "$MJS_USER" | ||||||
| echo "$MJS_USER:$MJS_USER_PASS" | chpasswd | echo "$MJS_USER:$MJS_USER_PASS" | chpasswd | ||||||
| 
 | 
 | ||||||
| #Create ssh key and restrict connections | #Create ssh key and restrict connections | ||||||
| sudo su "$MJS_USER" -c "ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -o -a 200 -q -N ''" | sudo su "$MJS_USER" -c "ssh-keygen -t rsa -f ~/.ssh/id_rsa -b 4096 -o -a 100 -q -N ''" | ||||||
| #Allow password authentication | #Allow password authentication | ||||||
| sed -i "s|PasswordAuthentication .*|PasswordAuthentication yes|" /etc/ssh/sshd_config | sed -i "s|PasswordAuthentication .*|PasswordAuthentication yes|" /etc/ssh/sshd_config | ||||||
| systemctl daemon-reload | systemctl restart sshd | ||||||
| systemctl restart ssh.service ssh.socket |  | ||||||
| 
 | 
 | ||||||
| #Setting varibales for add-jibri-node.sh | #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_DIST=.*|MAIN_SRV_DIST=\"$DIST\"|" add-jibri-node.sh | ||||||
|  | @ -974,17 +943,16 @@ JVB_SECRET=$(g_conf_value JVB_SECRET=) | ||||||
| JVB_OPTS=$(g_conf_value JVB_OPTS=) | JVB_OPTS=$(g_conf_value JVB_OPTS=) | ||||||
| JAVA_SYS_PROPS=$(g_conf_value JAVA_SYS_PROPS=) | JAVA_SYS_PROPS=$(g_conf_value JAVA_SYS_PROPS=) | ||||||
| 
 | 
 | ||||||
| #FIXME: - sip-communicator.properties - no longer exist | g_sip_value() { | ||||||
| #g_sip_value() { |   grep "$1" "$JVB2_SIP" |cut -d "=" -f2 | ||||||
| #  grep "$1" "$JVB2_SIP" |cut -d "=" -f2 | } | ||||||
| #} | DISABLE_AWS_HARVESTER=$(g_sip_value DISABLE_AWS_HARVESTER=) | ||||||
| #DISABLE_AWS_HARVESTER=$(g_sip_value DISABLE_AWS_HARVESTER=) | STUN_MAPPING_HARVESTER_ADDRESSES=$(g_sip_value STUN_MAPPING_HARVESTER_ADDRESSES=) | ||||||
| #STUN_MAPPING_HARVESTER_ADDRESSES=$(g_sip_value STUN_MAPPING_HARVESTER_ADDRESSES=) | ENABLE_STATISTICS=$(g_sip_value ENABLE_STATISTICS=) | ||||||
| #ENABLE_STATISTICS=$(g_sip_value ENABLE_STATISTICS=) | SHARD_HOSTNAME=$(g_sip_value shard.HOSTNAME=) | ||||||
| #SHARD_HOSTNAME=$(g_sip_value shard.HOSTNAME=) | SHARD_DOMAIN=$(g_sip_value shard.DOMAIN=) | ||||||
| #SHARD_DOMAIN=$(g_sip_value shard.DOMAIN=) | SHARD_PASSWORD=$(g_sip_value shard.PASSWORD=) | ||||||
| #SHARD_PASSWORD=$(g_sip_value shard.PASSWORD=) | MUC_JID=$(g_sip_value MUC_JIDS=) | ||||||
| #MUC_JID=$(g_sip_value MUC_JIDS=) |  | ||||||
| 
 | 
 | ||||||
| ##-- Replacing on add-jvb2-node.sh | ##-- Replacing on add-jvb2-node.sh | ||||||
| sed -i "s|JVB_HOSTNAME=.*|JVB_HOSTNAME=$JVB_HOSTNAME|" add-jvb2-node.sh | sed -i "s|JVB_HOSTNAME=.*|JVB_HOSTNAME=$JVB_HOSTNAME|" add-jvb2-node.sh | ||||||
|  | @ -993,14 +961,14 @@ sed -i "s|JVB_PORT=.*|JVB_PORT=$JVB_PORT|" add-jvb2-node.sh | ||||||
| sed -i "s|JVB_SECRET=.*|JVB_SECRET=$JVB_SECRET|" add-jvb2-node.sh | sed -i "s|JVB_SECRET=.*|JVB_SECRET=$JVB_SECRET|" add-jvb2-node.sh | ||||||
| sed -i "s|JVB_OPTS=.*|JVB_OPTS=$JVB_OPTS|" add-jvb2-node.sh | sed -i "s|JVB_OPTS=.*|JVB_OPTS=$JVB_OPTS|" add-jvb2-node.sh | ||||||
| sed -i "s|SYS_PROPS=.*|SYS_PROPS=$JAVA_SYS_PROPS|" add-jvb2-node.sh | sed -i "s|SYS_PROPS=.*|SYS_PROPS=$JAVA_SYS_PROPS|" add-jvb2-node.sh | ||||||
| #FIXME: - sip-communicator.properties - no longer exist | #- | ||||||
| #sed -i "s|AWS_HARVEST=.*|AWS_HARVEST=$DISABLE_AWS_HARVESTER|" add-jvb2-node.sh | sed -i "s|AWS_HARVEST=.*|AWS_HARVEST=$DISABLE_AWS_HARVESTER|" add-jvb2-node.sh | ||||||
| #sed -i "s|STUN_MAPPING=.*|STUN_MAPPING=$STUN_MAPPING_HARVESTER_ADDRESSES|" add-jvb2-node.sh | sed -i "s|STUN_MAPPING=.*|STUN_MAPPING=$STUN_MAPPING_HARVESTER_ADDRESSES|" add-jvb2-node.sh | ||||||
| #sed -i "s|ENABLE_STATISTICS=.*|ENABLE_STATISTICS=$ENABLE_STATISTICS|" add-jvb2-node.sh | sed -i "s|ENABLE_STATISTICS=.*|ENABLE_STATISTICS=$ENABLE_STATISTICS|" add-jvb2-node.sh | ||||||
| #sed -i "s|SHARD_HOSTNAME=.*|SHARD_HOSTNAME=$SHARD_HOSTNAME|" add-jvb2-node.sh | sed -i "s|SHARD_HOSTNAME=.*|SHARD_HOSTNAME=$SHARD_HOSTNAME|" add-jvb2-node.sh | ||||||
| #sed -i "s|SHARD_DOMAIN=.*|SHARD_DOMAIN=$SHARD_DOMAIN|" add-jvb2-node.sh | sed -i "s|SHARD_DOMAIN=.*|SHARD_DOMAIN=$SHARD_DOMAIN|" add-jvb2-node.sh | ||||||
| #sed -i "s|SHARD_PASS=.*|SHARD_PASS=$SHARD_PASSWORD|" add-jvb2-node.sh | sed -i "s|SHARD_PASS=.*|SHARD_PASS=$SHARD_PASSWORD|" add-jvb2-node.sh | ||||||
| #sed -i "s|MUC_JID=.*|MUC_JID=$MUC_JID|" add-jvb2-node.sh | sed -i "s|MUC_JID=.*|MUC_JID=$MUC_JID|" add-jvb2-node.sh | ||||||
| 
 | 
 | ||||||
| sed -i "s|MAIN_SRV_DIST=.*|MAIN_SRV_DIST=\"$DIST\"|" add-jvb2-node.sh | sed -i "s|MAIN_SRV_DIST=.*|MAIN_SRV_DIST=\"$DIST\"|" add-jvb2-node.sh | ||||||
| sed -i "s|MAIN_SRV_REPO=.*|MAIN_SRV_REPO=\"$JITSI_REPO\"|" add-jvb2-node.sh | sed -i "s|MAIN_SRV_REPO=.*|MAIN_SRV_REPO=\"$JITSI_REPO\"|" add-jvb2-node.sh | ||||||
|  | @ -1019,13 +987,8 @@ else | ||||||
|     echo -n "No condition meet, please report to:" |     echo -n "No condition meet, please report to:" | ||||||
|     echo "https://forge.switnet.net/switnet/quick-jibri-installer/issues" |     echo "https://forge.switnet.net/switnet/quick-jibri-installer/issues" | ||||||
| fi | fi | ||||||
| # Remove possible duplication of wasm definition. |  | ||||||
| grep -q wasm /etc/nginx/mime.types && sed -i '/types {/,/}/ {/wasm/d}' "$WS_CONF" |  | ||||||
| 
 |  | ||||||
| sleep .1 | sleep .1 | ||||||
| #-------------------------------------------------- | #================== Setup prosody conf file ================= | ||||||
| print_title "Setup prosody conf file" |  | ||||||
| #-------------------------------------------------- |  | ||||||
| 
 | 
 | ||||||
| ###Setup secure rooms | ###Setup secure rooms | ||||||
| if [ "$ENABLE_SC" = "yes" ]; then | if [ "$ENABLE_SC" = "yes" ]; then | ||||||
|  | @ -1075,10 +1038,8 @@ VirtualHost "guest.$DOMAIN" | ||||||
| P_SR | P_SR | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| #-------------------------------------------------- | #====================== | ||||||
| print_title "Custom settings" | # Custom settings | ||||||
| #-------------------------------------------------- |  | ||||||
| 
 |  | ||||||
| #Start with video muted by default | #Start with video muted by default | ||||||
| sed -i "s|// startWithVideoMuted: false,|startWithVideoMuted: true,|" "$MEET_CONF" | sed -i "s|// startWithVideoMuted: false,|startWithVideoMuted: true,|" "$MEET_CONF" | ||||||
| 
 | 
 | ||||||
|  | @ -1089,7 +1050,7 @@ sed -i "s|// startAudioMuted: 10,|startAudioMuted: 2,|" "$MEET_CONF" | ||||||
| [ "$ENABLE_WELCP" = "yes" ] && ENABLE_WELCP_BOL=true | [ "$ENABLE_WELCP" = "yes" ] && ENABLE_WELCP_BOL=true | ||||||
| [ "$ENABLE_WELCP" = "no" ] && ENABLE_WELCP_BOL=false | [ "$ENABLE_WELCP" = "no" ] && ENABLE_WELCP_BOL=false | ||||||
| export ENABLE_WELCP_BOL | export ENABLE_WELCP_BOL | ||||||
| echo "> Patching config.js to modify welcome page behavior..." | echo "> Patching config.js to modify welcompage behavior..." | ||||||
| echo "  Read more about patches at the patches folder." | echo "  Read more about patches at the patches folder." | ||||||
| envsubst < \ | envsubst < \ | ||||||
|   patches/jitsi-meet/002-jitsi-meet-welcome-page-on-off.patch | \ |   patches/jitsi-meet/002-jitsi-meet-welcome-page-on-off.patch | \ | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Automated AWS generic kernel setup for jibri. | # Automated AWS generic kernel setup for jibri. | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Simple Fail2ban configuration | # Simple Fail2ban configuration | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GNU GPLv3 or later. | # GNU GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Simple Jibri conf updater | # Simple Jibri conf updater | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GNU GPLv3 or later. | # GNU GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  | @ -31,7 +31,7 @@ if ! [ "$(id -u)" = 0 ]; then | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| echo "Checking for updates...." | echo "Checking for updates...." | ||||||
| apt-get -q2 update | apt -q2 update | ||||||
| apt install -y \ | apt install -y \ | ||||||
|                 apt-show-versions \ |                 apt-show-versions \ | ||||||
|                 jq |                 jq | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Simple Jibri resolution enhancer | # Simple Jibri resolution enhancer | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GNU GPLv3 or later. | # GNU GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Automated PHP environment build for Nextcloud. | # Automated PHP environment build for Nextcloud. | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| PHPVER=$1 | PHPVER=$1 | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| #Start over | #Start over | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GPLv3 or later. | # GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Simple Jibri Env tester | # Simple Jibri Env tester | ||||||
| # SwITNet Ltd © - 2025, https://switnet.net/ | # SwITNet Ltd © - 2024, https://switnet.net/ | ||||||
| # GNU GPLv3 or later. | # GNU GPLv3 or later. | ||||||
| 
 | 
 | ||||||
| while getopts m: option | while getopts m: option | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue