quick_jibri_installer.sh: update and fix for newer release (2025) #118
			
				
			
		
		
		
	| 
						 | 
				
			
			@ -7,14 +7,15 @@ echo "Started at $(date +'%Y-%m-%d %H:%M:%S')" >> qj-installer.log
 | 
			
		|||
 | 
			
		||||
while getopts m: option
 | 
			
		||||
do
 | 
			
		||||
	case "${option}"
 | 
			
		||||
	in
 | 
			
		||||
		m) MODE=${OPTARG};;
 | 
			
		||||
		\?) echo "Usage: sudo bash ./$0 [-m debug]" && exit;;
 | 
			
		||||
	esac
 | 
			
		||||
    case "${option}"
 | 
			
		||||
    in
 | 
			
		||||
        m) MODE=${OPTARG};;
 | 
			
		||||
        \?) echo "Usage: sudo bash ./$0 [-m debug]" && exit;;
 | 
			
		||||
    esac
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
if [ "$MODE" = "debug" ]; then
 | 
			
		||||
    export MODE=debug
 | 
			
		||||
    set -x
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -51,13 +52,13 @@ printwc() {
 | 
			
		|||
    printf "%b$2%b" "$1" "${Color_Off}"
 | 
			
		||||
}
 | 
			
		||||
exit_ifinstalled() {
 | 
			
		||||
	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 -e "\nThis instance already has $1 installed, exiting..."
 | 
			
		||||
        echo -e "Please try again on a clean system."
 | 
			
		||||
        echo -e " If you think this is an error, please report to:"
 | 
			
		||||
        echo -e "  -> https://forge.switnet.net/switnet/quick-jibri-installer/issues"
 | 
			
		||||
		exit
 | 
			
		||||
	fi
 | 
			
		||||
        exit
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
exit_ifinstalled jitsi-meet
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -405,6 +406,7 @@ apt-get -y install \
 | 
			
		|||
    fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
###FIXME: Trisquel support broken by lsb_release usage###
 | 
			
		||||
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)")"
 | 
			
		||||
| 
						 | 
				
			
			@ -420,11 +422,9 @@ fi
 | 
			
		|||
 | 
			
		||||
check_serv
 | 
			
		||||
 | 
			
		||||
echo "
 | 
			
		||||
#--------------------------------------------------
 | 
			
		||||
# Install Jitsi Framework
 | 
			
		||||
print_title "Install Jitsi Framework"
 | 
			
		||||
#--------------------------------------------------
 | 
			
		||||
"
 | 
			
		||||
if [ "$LE_SSL" = "yes" ]; then
 | 
			
		||||
    echo "set jitsi-meet/cert-choice	select	$CERT_CHOICE_DEBCONF" \
 | 
			
		||||
        | debconf-set-selections
 | 
			
		||||
| 
						 | 
				
			
			@ -469,7 +469,9 @@ elif [ "$(npm list -g esprima 2>/dev/null | grep -c "esprima")" == "1" ]; then
 | 
			
		|||
    echo "Good. Esprima package is already installed"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "# Installing Google Chrome / ChromeDriver"
 | 
			
		||||
#--------------------------------------------------
 | 
			
		||||
print_title "Installing Google Chrome / ChromeDriver"
 | 
			
		||||
#--------------------------------------------------
 | 
			
		||||
if [ "$GOOGLE_ACTIVE_REPO" = "main" ]; then
 | 
			
		||||
    echo "Google repository already set."
 | 
			
		||||
else
 | 
			
		||||
| 
						 | 
				
			
			@ -484,7 +486,10 @@ rm -rf "$GOOGL_REPO"
 | 
			
		|||
 | 
			
		||||
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_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"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -582,15 +587,17 @@ sleep .1
 | 
			
		|||
read -p "Leave empty to use the default one (English):$NL" -r L10N_ME
 | 
			
		||||
 | 
			
		||||
#Drop unsecure TLS
 | 
			
		||||
while [ "$DROP_TLS1" != "yes" ] && [ "$DROP_TLS1" != "no" ]
 | 
			
		||||
do
 | 
			
		||||
    read -p "> Do you want to drop support for unsecure protocols TLSv1.0/1.1 now: (yes or no)$NL" -r DROP_TLS1
 | 
			
		||||
    if [ "$DROP_TLS1" = "no" ]; then
 | 
			
		||||
        printf " - TLSv1.0/1.1 will remain.\n\n"
 | 
			
		||||
    elif [ "$DROP_TLS1" = "yes" ]; then
 | 
			
		||||
        printf " - TLSv1.0/1.1 will be dropped\n\n"
 | 
			
		||||
    fi
 | 
			
		||||
done
 | 
			
		||||
if grep -qE 'TLSv1(\.1)?' /etc/nginx/nginx.conf; then
 | 
			
		||||
    while [ "$DROP_TLS1" != "yes" ] && [ "$DROP_TLS1" != "no" ]
 | 
			
		||||
    do
 | 
			
		||||
        read -p "> Do you want to drop support for unsecure protocols TLSv1.0/1.1 now: (yes or no)$NL" -r DROP_TLS1
 | 
			
		||||
        if [ "$DROP_TLS1" = "no" ]; then
 | 
			
		||||
            printf " - TLSv1.0/1.1 will remain.\n\n"
 | 
			
		||||
        elif [ "$DROP_TLS1" = "yes" ]; then
 | 
			
		||||
            printf " - TLSv1.0/1.1 will be dropped\n\n"
 | 
			
		||||
        fi
 | 
			
		||||
    done
 | 
			
		||||
fi
 | 
			
		||||
sleep .1
 | 
			
		||||
#Brandless  Mode
 | 
			
		||||
while [ "$ENABLE_BLESSM" != "yes" ] && [ "$ENABLE_BLESSM" != "no" ]
 | 
			
		||||
| 
						 | 
				
			
			@ -795,7 +802,9 @@ restart_services() {
 | 
			
		|||
# Configure Jvb2
 | 
			
		||||
sed -i "/shard.HOSTNAME/s|localhost|$DOMAIN|" "$JVB2_SIP"
 | 
			
		||||
 | 
			
		||||
# Configure Jibri
 | 
			
		||||
#--------------------------------------------------
 | 
			
		||||
print_title "Configure Jibri"
 | 
			
		||||
#--------------------------------------------------
 | 
			
		||||
if [ "$ENABLE_SC" = "yes" ]; then
 | 
			
		||||
  if [ ! -f "$MOD_LIST_FILE" ]; then
 | 
			
		||||
  printf "\n-> Adding external module to list prosody users...\n"
 | 
			
		||||
| 
						 | 
				
			
			@ -993,7 +1002,9 @@ fi
 | 
			
		|||
grep -q wasm /etc/nginx/mime.types && sed -i '/types {/,/}/ {/wasm/d}' "$WS_CONF"
 | 
			
		||||
 | 
			
		||||
sleep .1
 | 
			
		||||
#================== Setup prosody conf file =================
 | 
			
		||||
#--------------------------------------------------
 | 
			
		||||
print_title "Setup prosody conf file"
 | 
			
		||||
#--------------------------------------------------
 | 
			
		||||
 | 
			
		||||
###Setup secure rooms
 | 
			
		||||
if [ "$ENABLE_SC" = "yes" ]; then
 | 
			
		||||
| 
						 | 
				
			
			@ -1043,8 +1054,11 @@ VirtualHost "guest.$DOMAIN"
 | 
			
		|||
P_SR
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
#======================
 | 
			
		||||
# Custom settings
 | 
			
		||||
 | 
			
		||||
#--------------------------------------------------
 | 
			
		||||
print_title "Custom settings"
 | 
			
		||||
#--------------------------------------------------
 | 
			
		||||
 | 
			
		||||
#Start with video muted by default
 | 
			
		||||
sed -i "s|// startWithVideoMuted: false,|startWithVideoMuted: true,|" "$MEET_CONF"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue