5.4.3 #35

Merged
Ark74 merged 7 commits from unstable into master 2021-04-12 15:55:14 +00:00
10 changed files with 709 additions and 683 deletions

View File

@ -9,18 +9,18 @@
#Make sure the file name is the required one #Make sure the file name is the required one
if [ ! "$(basename $0)" = "add-jibri-node.sh" ]; then if [ ! "$(basename $0)" = "add-jibri-node.sh" ]; then
echo "For most cases naming won't matter, for this one it does." echo "For most cases naming won't matter, for this one it does."
echo "Please use the original name for this script: \`add-jibri-node.sh', and run again." echo "Please use the original name for this script: \`add-jibri-node.sh', and run again."
exit exit
fi fi
while getopts m: option while getopts m: option
do do
case "${option}" case "${option}"
in in
m) MODE=${OPTARG};; m) MODE=${OPTARG};;
\?) echo "Usage: sudo ./add_jibri_node.sh [-m debug]" && exit;; \?) echo "Usage: sudo ./add_jibri_node.sh [-m debug]" && exit;;
esac esac
done done
#DEBUG #DEBUG
@ -66,33 +66,75 @@ TEST_JIBRI_ENV="$GITHUB_RAW/$GIT_REPO/unstable/tools/test-jibri-env.sh"
# sed limiters for add-jibri-node.sh variables # sed limiters for add-jibri-node.sh variables
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
} }
check_var() { check_var() {
if [ -z "$2" ]; then if [ "$2" = "TBD" ]; then
echo -e "Check if variable $1 is set: \xE2\x9C\x96 \nExiting..." echo -e "Check if variable $1 is set: \xE2\x9C\x96"
exit exit
else else
echo -e "Check if variable $1 is set: \xE2\x9C\x94" echo -e "Check if variable $1 is set: \xE2\x9C\x94"
fi fi
} }
if [ -z "$LAST" ]; then if [ -z "$LAST" ]; then
echo "There is an error on the LAST definition, please report." echo "There is an error on the LAST definition, please report."
exit exit
elif [ "$LAST" = "TBD" ]; then elif [ "$LAST" = "TBD" ]; then
ADDUP=$((START + 1)) ADDUP=$((START + 1))
else else
ADDUP=$((LAST + 1)) ADDUP=$((LAST + 1))
fi fi
echo "
#-----------------------------------------------------------------------
# Checking initial necessary variables...
#-----------------------------------------------------------------------"
JMS_DATA=($MAIN_SRV_DIST \
$MAIN_SRV_REPO \
$MAIN_SRV_DOMAIN \
$JibriBrewery \
$JB_NAME \
$JB_AUTH_PASS \
$JB_REC_PASS \
$MJS_USER \
$MJS_USER_PASS)
JMS_EVAL=${JMS_DATA[0]}
for i in "${JMS_DATA[@]}"; do
if [[ "$JMS_EVAL" != "$i" ]]; then
ALL_TBD="no"
break
fi
done
if [ "$ALL_TBD" = "no" ];then
echo -e "Good, seems this is not a vanilla copy of add-jibri-node.sh,
let's check variables ...\n"
else
echo -e "You seem to be using a vanilla copy of the add-jibri-node.sh.
> Please use the content (or apply the changes) of add-jibri-node.sh from
the main Jitsi server installation folder, as it contains necessary data.\n"
exit
fi
check_var MAIN_SRV_DIST "$MAIN_SRV_DIST"
check_var MAIN_SRV_REPO "$MAIN_SRV_REPO"
check_var MAIN_SRV_DOMAIN "$MAIN_SRV_DOMAIN"
check_var JibriBrewery "$JibriBrewery"
check_var JB_NAME "$JB_NAME"
check_var JB_AUTH_PASS "$JB_AUTH_PASS"
check_var JB_REC_PASS "$JB_REC_PASS"
check_var MJS_USER "$MJS_USER"
check_var MJS_USER_PASS "$MJS_USER_PASS"
#Check server and node OS #Check server and node OS
if [ ! "$THIS_SRV_DIST" = "$MAIN_SRV_DIST" ]; then if [ ! "$THIS_SRV_DIST" = "$MAIN_SRV_DIST" ]; then
echo "Please use the same OS for the jibri setup on both servers." echo "Please use the same OS for the jibri setup on both servers."
echo "This server is based on: $THIS_SRV_DIST" echo "This server is based on: $THIS_SRV_DIST"
echo "The main server record claims is based on: $MAIN_SRV_DIST" echo "The main server record claims is based on: $MAIN_SRV_DIST"
exit exit
fi fi
#Check system resources #Check system resources
@ -132,29 +174,14 @@ else
do do
read -p "> Do you want to continue?: (yes or no)"$'\n' -r CONTINUE_LOW_RES read -p "> Do you want to continue?: (yes or no)"$'\n' -r CONTINUE_LOW_RES
if [ "$CONTINUE_LOW_RES" = "no" ]; then if [ "$CONTINUE_LOW_RES" = "no" ]; then
echo "See you next time with more resources!..." echo "See you next time with more resources!..."
exit exit
elif [ "$CONTINUE_LOW_RES" = "yes" ]; then elif [ "$CONTINUE_LOW_RES" = "yes" ]; then
echo "Please keep in mind that we might not support underpowered nodes." echo "Please keep in mind that we might not support underpowered nodes."
fi fi
done done
fi fi
echo "
#-----------------------------------------------------------------------
# Checking initial necessary variables...
#-----------------------------------------------------------------------"
check_var MAIN_SRV_DIST "$MAIN_SRV_DIST"
check_var MAIN_SRV_REPO "$MAIN_SRV_REPO"
check_var MAIN_SRV_DOMAIN "$MAIN_SRV_DOMAIN"
check_var JibriBrewery "$JibriBrewery"
check_var JB_NAME "$JB_NAME"
check_var JB_AUTH_PASS "$JB_AUTH_PASS"
check_var JB_REC_PASS "$JB_REC_PASS"
check_var MJS_USER "$MJS_USER"
check_var MJS_USER_PASS "$MJS_USER_PASS"
# Rename hostname for each jibri node # Rename hostname for each jibri node
hostnamectl set-hostname "jbnode${ADDUP}.${MAIN_SRV_DOMAIN}" hostnamectl set-hostname "jbnode${ADDUP}.${MAIN_SRV_DOMAIN}"
sed -i "1i 127.0.0.1 jbnode${ADDUP}.${MAIN_SRV_DOMAIN}" /etc/hosts sed -i "1i 127.0.0.1 jbnode${ADDUP}.${MAIN_SRV_DOMAIN}" /etc/hosts
@ -162,15 +189,15 @@ sed -i "1i 127.0.0.1 jbnode${ADDUP}.${MAIN_SRV_DOMAIN}" /etc/hosts
# Jitsi-Meet Repo # Jitsi-Meet Repo
echo "Add Jitsi repo" echo "Add Jitsi repo"
if [ -z "$JITSI_REPO" ]; then if [ -z "$JITSI_REPO" ]; then
echo "deb http://download.jitsi.org $MAIN_SRV_REPO/" > /etc/apt/sources.list.d/jitsi-$MAIN_SRV_REPO.list 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 - wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add -
elif [ ! "$JITSI_REPO" = "$MAIN_SRV_REPO" ]; then elif [ ! "$JITSI_REPO" = "$MAIN_SRV_REPO" ]; then
echo "Main and node servers repository don't match, extiting.." echo "Main and node servers repository don't match, extiting.."
exit exit
elif [ "$JITSI_REPO" = "$MAIN_SRV_REPO" ]; then elif [ "$JITSI_REPO" = "$MAIN_SRV_REPO" ]; then
echo "Main and node servers repository match, continuing..." echo "Main and node servers repository match, continuing..."
else else
echo "Jitsi $JITSI_REPO repository already installed" echo "Jitsi $JITSI_REPO repository already installed"
fi fi
# Requirements # Requirements
@ -179,30 +206,30 @@ apt-get update -q2
apt-get dist-upgrade -yq2 apt-get dist-upgrade -yq2
apt-get -y install \ apt-get -y install \
apt-show-versions \ apt-show-versions \
bmon \ bmon \
curl \ curl \
ffmpeg \ ffmpeg \
git \ git \
htop \ htop \
inotify-tools \ inotify-tools \
jq \ jq \
rsync \ rsync \
ssh \ ssh \
unzip \ unzip \
wget wget
check_snd_driver() { check_snd_driver() {
echo -e "\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 | grep snd_aloop | head -n 1 | cut -d " " -f1)" = "snd_aloop" ]; then if [ "$(lsmod | grep snd_aloop | head -n 1 | cut -d " " -f1)" = "snd_aloop" ]; then
echo " echo "
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# Audio driver seems - OK. # Audio driver seems - OK.
#-----------------------------------------------------------------------" #-----------------------------------------------------------------------"
else else
echo " echo "
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# Your audio driver might not be able to load. # Your audio driver might not be able to load.
# We'll check the state of this Jibri with our 'test-jibri-env.sh' tool. # We'll check the state of this Jibri with our 'test-jibri-env.sh' tool.
@ -224,7 +251,7 @@ HWE_VIR_MOD=$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr) 2>/de
if [ "$HWE_VIR_MOD" = "1" ]; then if [ "$HWE_VIR_MOD" = "1" ]; then
apt-get -y install \ apt-get -y install \
linux-image-generic-hwe-$(lsb_release -sr) linux-image-generic-hwe-$(lsb_release -sr)
else else
apt-get -y install \ apt-get -y install \
linux-image-generic \ linux-image-generic \
linux-modules-extra-$(uname -r) linux-modules-extra-$(uname -r)
@ -241,25 +268,25 @@ apt-get -y install \
echo "# Installing Google Chrome / ChromeDriver" echo "# 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
echo "Installing Google Chrome Stable" echo "Installing Google Chrome Stable"
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | tee $GOOGL_REPO 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 -y google-chrome-stable apt-get install -y google-chrome-stable
rm -rf /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list rm -rf /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list
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 https://chromedriver.storage.googleapis.com/$CHD_VER/chromedriver_linux64.zip -O /tmp/chromedriver_linux64.zip wget -q https://chromedriver.storage.googleapis.com/$CHD_VER/chromedriver_linux64.zip -O /tmp/chromedriver_linux64.zip
unzip /tmp/chromedriver_linux64.zip -d /usr/local/bin/ unzip /tmp/chromedriver_linux64.zip -d /usr/local/bin/
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 /tpm/chromedriver_linux64.zip rm -rf /tpm/chromedriver_linux64.zip
fi fi
echo " echo "
@ -333,57 +360,57 @@ jibri {
xmpp { xmpp {
environments = [ environments = [
{ {
// A user-friendly name for this environment // A user-friendly name for this environment
name = "$JB_NAME" name = "$JB_NAME"
// A list of XMPP server hosts to which we'll connect // A list of XMPP server hosts to which we'll connect
xmpp-server-hosts = [ "$MAIN_SRV_DOMAIN" ] xmpp-server-hosts = [ "$MAIN_SRV_DOMAIN" ]
// The base XMPP domain // The base XMPP domain
xmpp-domain = "$MAIN_SRV_DOMAIN" xmpp-domain = "$MAIN_SRV_DOMAIN"
// The MUC we'll join to announce our presence for // The MUC we'll join to announce our presence for
// recording and streaming services // recording and streaming services
control-muc { control-muc {
domain = "internal.auth.$MAIN_SRV_DOMAIN" domain = "internal.auth.$MAIN_SRV_DOMAIN"
room-name = "$JibriBrewery" room-name = "$JibriBrewery"
nickname = "Live-$ADDUP" nickname = "Live-$ADDUP"
} }
// The login information for the control MUC // The login information for the control MUC
control-login { control-login {
domain = "auth.$MAIN_SRV_DOMAIN" domain = "auth.$MAIN_SRV_DOMAIN"
username = "jibri" username = "jibri"
password = "$JB_AUTH_PASS" password = "$JB_AUTH_PASS"
} }
// An (optional) MUC configuration where we'll // An (optional) MUC configuration where we'll
// join to announce SIP gateway services // join to announce SIP gateway services
// sip-control-muc { // sip-control-muc {
// domain = "domain" // domain = "domain"
// room-name = "room-name" // room-name = "room-name"
// nickname = "nickname" // nickname = "nickname"
// } // }
// The login information the selenium web client will use // The login information the selenium web client will use
call-login { call-login {
domain = "recorder.$MAIN_SRV_DOMAIN" domain = "recorder.$MAIN_SRV_DOMAIN"
username = "recorder" username = "recorder"
password = "$JB_REC_PASS" password = "$JB_REC_PASS"
} }
// The value we'll strip from the room JID domain to derive // The value we'll strip from the room JID domain to derive
// the call URL // the call URL
strip-from-room-domain = "conference." strip-from-room-domain = "conference."
// How long Jibri sessions will be allowed to last before // How long Jibri sessions will be allowed to last before
// they are stopped. A value of 0 allows them to go on // they are stopped. A value of 0 allows them to go on
// indefinitely // indefinitely
usage-timeout = 0 hour usage-timeout = 0 hour
// Whether or not we'll automatically trust any cert on // Whether or not we'll automatically trust any cert on
// this XMPP domain // this XMPP domain
trust-all-xmpp-certs = true trust-all-xmpp-certs = true
} }
] ]
} }

View File

@ -9,18 +9,18 @@
#Make sure the file name is the required one #Make sure the file name is the required one
if [ ! "$(basename $0)" = "add-jvb2-node.sh" ]; then if [ ! "$(basename $0)" = "add-jvb2-node.sh" ]; then
echo "For most cases naming won't matter, for this one it does." echo "For most cases naming won't matter, for this one it does."
echo "Please use the original name for this script: \`add-jvb2-node.sh', and run again." echo "Please use the original name for this script: \`add-jvb2-node.sh', and run again."
exit exit
fi fi
while getopts m: option while getopts m: option
do do
case "${option}" case "${option}"
in in
m) MODE=${OPTARG};; m) MODE=${OPTARG};;
\?) echo "Usage: sudo ./add-jvb2-node.sh [-m debug]" && exit;; \?) echo "Usage: sudo ./add-jvb2-node.sh [-m debug]" && exit;;
esac esac
done done
#DEBUG #DEBUG
@ -73,33 +73,33 @@ NJN_USER_PASS="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 32 | head -n1)"
# sed limiters for add-jvb2-node.sh variables # sed limiters for add-jvb2-node.sh variables
var_dlim() { var_dlim() {
grep -n $1 add-jvb2-node.sh|head -n1|cut -d ":" -f1 grep -n $1 add-jvb2-node.sh|head -n1|cut -d ":" -f1
} }
check_var() { check_var() {
if [ -z "$2" ]; then if [ -z "$2" ]; then
echo -e "Check if variable $1 is set: \xE2\x9C\x96 \nExiting..." echo -e "Check if variable $1 is set: \xE2\x9C\x96 \nExiting..."
exit exit
else else
echo -e "Check if variable $1 is set: \xE2\x9C\x94" echo -e "Check if variable $1 is set: \xE2\x9C\x94"
fi fi
} }
if [ -z "$LAST" ]; then if [ -z "$LAST" ]; then
echo "There is an error on the LAST definition, please report." echo "There is an error on the LAST definition, please report."
exit exit
elif [ "$LAST" = "TBD" ]; then elif [ "$LAST" = "TBD" ]; then
ADDUP=$((START + 1)) ADDUP=$((START + 1))
else else
ADDUP=$((LAST + 1)) ADDUP=$((LAST + 1))
fi fi
#Check server and node OS #Check server and node OS
if [ ! "$THIS_SRV_DIST" = "$MAIN_SRV_DIST" ]; then if [ ! "$THIS_SRV_DIST" = "$MAIN_SRV_DIST" ]; then
echo "Please use the same OS for the JVB2 setup on both servers." echo "Please use the same OS for the JVB2 setup on both servers."
echo "This server is based on: $THIS_SRV_DIST" echo "This server is based on: $THIS_SRV_DIST"
echo "The main server record claims is based on: $MAIN_SRV_DIST" echo "The main server record claims is based on: $MAIN_SRV_DIST"
exit exit
fi fi
#Check system resources #Check system resources
@ -177,15 +177,15 @@ sed -i "1i 127.0.0.1 jvb${ADDUP}.${MAIN_SRV_DOMAIN}" /etc/hosts
# Jitsi-Meet Repo # Jitsi-Meet Repo
echo "Add Jitsi repo" echo "Add Jitsi repo"
if [ -z "$JITSI_REPO" ]; then if [ -z "$JITSI_REPO" ]; then
echo "deb http://download.jitsi.org $MAIN_SRV_REPO/" > /etc/apt/sources.list.d/jitsi-$MAIN_SRV_REPO.list 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 - wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add -
elif [ ! "$JITSI_REPO" = "$MAIN_SRV_REPO" ]; then elif [ ! "$JITSI_REPO" = "$MAIN_SRV_REPO" ]; then
echo "Main and node servers repository don't match, extiting.." echo "Main and node servers repository don't match, extiting.."
exit exit
elif [ "$JITSI_REPO" = "$MAIN_SRV_REPO" ]; then elif [ "$JITSI_REPO" = "$MAIN_SRV_REPO" ]; then
echo "Main and node servers repository match, continuing..." echo "Main and node servers repository match, continuing..."
else else
echo "Jitsi $JITSI_REPO repository already installed" echo "Jitsi $JITSI_REPO repository already installed"
fi fi
# Requirements # Requirements
@ -194,14 +194,14 @@ apt-get update -q2
apt-get dist-upgrade -yq2 apt-get dist-upgrade -yq2
apt-get -y install \ apt-get -y install \
apt-show-versions \ apt-show-versions \
bmon \ bmon \
curl \ curl \
git \ git \
htop \ htop \
ssh \ ssh \
unzip \ unzip \
wget wget
echo "# Check and Install HWE kernel if possible..." echo "# Check and Install HWE kernel if possible..."
HWE_VIR_MOD=$(apt-cache madison linux-modules-extra-virtual-hwe-$(lsb_release -sr) 2>/dev/null|head -n1|grep -c "extra-virtual-hwe") HWE_VIR_MOD=$(apt-cache madison linux-modules-extra-virtual-hwe-$(lsb_release -sr) 2>/dev/null|head -n1|grep -c "extra-virtual-hwe")
@ -222,8 +222,8 @@ echo "
echo "jitsi-videobridge jitsi-videobridge/jvb-hostname string $MAIN_SRV_DOMAIN" | debconf-set-selections echo "jitsi-videobridge jitsi-videobridge/jvb-hostname string $MAIN_SRV_DOMAIN" | debconf-set-selections
apt-get -y install \ apt-get -y install \
jitsi-videobridge2 \ jitsi-videobridge2 \
openjdk-8-jre-headless openjdk-8-jre-headless
echo ' echo '
######################################################################## ########################################################################

View File

@ -6,11 +6,11 @@
while getopts m: option while getopts m: option
do do
case "${option}" case "${option}"
in in
m) MODE=${OPTARG};; m) MODE=${OPTARG};;
\?) echo "Usage: sudo ./etherpad.sh [-m debug]" && exit;; \?) echo "Usage: sudo ./etherpad.sh [-m debug]" && exit;;
esac esac
done done
#DEBUG #DEBUG
@ -19,8 +19,8 @@ set -x
fi 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
clear clear
@ -41,10 +41,10 @@ cut -d "/" -f2
} }
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
echo " $1 is installed, skipping..." echo " $1 is installed, skipping..."
else else
echo -e "\n---- Installing $1 ----" echo -e "\n---- Installing $1 ----"
apt-get -yq2 install $1 apt-get -yq2 install $1
fi fi
} }
DOMAIN=$(ls /etc/prosody/conf.d/ | grep -v localhost | awk -F'.cfg' '{print $1}' | awk '!NF || !seen[$0]++') DOMAIN=$(ls /etc/prosody/conf.d/ | grep -v localhost | awk -F'.cfg' '{print $1}' | awk '!NF || !seen[$0]++')
@ -63,10 +63,10 @@ ETHERPAD_SYSTEMD="/etc/systemd/system/etherpad-lite.service"
echo "Addin NodeJS repo..." echo "Addin NodeJS repo..."
if [ "$NODE_JS_REPO" = "main" ]; then if [ "$NODE_JS_REPO" = "main" ]; then
echo "NodeJS repository already installed" echo "NodeJS repository already installed"
else else
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
apt-get update apt-get update
fi 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
@ -162,15 +162,15 @@ 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..."
sed -i "/Anything that didn't match above/i \ \ \ \ location \^\~\ \/etherpad\/ {" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ location \^\~\ \/etherpad\/ {" $WS_CONF
sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:9001\/;" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:9001\/;" $WS_CONF
sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_set_header X-Forwarded-For \$remote_addr;" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_set_header X-Forwarded-For \$remote_addr;" $WS_CONF
sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_buffering off;" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_buffering off;" $WS_CONF
sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_set_header Host \$host;" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_set_header Host \$host;" $WS_CONF
sed -i "/Anything that didn't match above/i \ \ \ \ }" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ }" $WS_CONF
sed -i "/Anything that didn't match above/i \\\n" $WS_CONF sed -i "/Anything that didn't match above/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:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues" -> https://github.com/switnet-ltd/quick-jibri-installer/issues"
fi fi
@ -186,10 +186,10 @@ echo "> Checking nginx configuration..."
nginx -t 2>/dev/null nginx -t 2>/dev/null
if [ $? = 0 ]; then if [ $? = 0 ]; then
echo -e " -- Docker configuration seems fine, enabling it." echo -e " -- Docker configuration seems fine, enabling it."
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:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues" -> https://github.com/switnet-ltd/quick-jibri-installer/issues"
fi fi

View File

@ -14,11 +14,11 @@
while getopts m: option while getopts m: option
do do
case "${option}" case "${option}"
in in
m) MODE=${OPTARG};; m) MODE=${OPTARG};;
\?) echo "Usage: sudo ./grafana.sh [-m debug]" && exit;; \?) echo "Usage: sudo ./grafana.sh [-m debug]" && exit;;
esac esac
done done
#DEBUG #DEBUG
@ -51,14 +51,18 @@ WS_CONF="/etc/nginx/sites-enabled/$DOMAIN.conf"
GRAFANA_PASS="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)" GRAFANA_PASS="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)"
# Min requirements # Min requirements
apt update && apt install -y gnupg2 curl wget jq apt-get update && \
apt-get install -y gnupg2 \
curl \
wget \
jq
echo " echo "
# Setup InfluxDB Packages # Setup InfluxDB Packages
" "
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - 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 echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
apt update && apt install influxdb -y apt-get update && apt-get install influxdb -y
run_service influxdb run_service influxdb
echo " echo "
@ -66,7 +70,7 @@ echo "
" "
curl -s https://packages.grafana.com/gpg.key | sudo apt-key add - curl -s https://packages.grafana.com/gpg.key | sudo apt-key add -
add-apt-repository "deb https://packages.grafana.com/oss/deb stable main" add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
apt update && apt install grafana -y apt-get update && apt-get install grafana -y
run_service grafana-server run_service grafana-server
echo " echo "
@ -74,7 +78,7 @@ echo "
" "
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - 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 echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
apt update && apt install telegraf -y apt-get update && apt-get install telegraf -y
mv /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.original mv /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.original
echo " echo "
@ -159,13 +163,13 @@ while [ $secs -gt 0 ]; do
done done
if [ -f $WS_CONF ]; then if [ -f $WS_CONF ]; then
sed -i "/Anything that didn't match above/i \ \ \ \ location \~ \^\/(grafana\/|grafana\/login) {" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ location \~ \^\/(grafana\/|grafana\/login) {" $WS_CONF
sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:3000;" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:3000;" $WS_CONF
sed -i "/Anything that didn't match above/i \ \ \ \ }" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ }" $WS_CONF
sed -i "/Anything that didn't match above/i \\\n" $WS_CONF sed -i "/Anything that didn't match above/i \\\n" $WS_CONF
systemctl restart nginx systemctl restart nginx
else else
echo "No app configuration done to server file, please report to: echo "No app configuration done to server file, please report to:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues" -> https://github.com/switnet-ltd/quick-jibri-installer/issues"
fi fi
@ -186,12 +190,12 @@ echo "
curl -s -k -u "admin:$GRAFANA_PASS" -X \ curl -s -k -u "admin:$GRAFANA_PASS" -X \
POST -H 'Content-Type: application/json;charset=UTF-8' -d \ POST -H 'Content-Type: application/json;charset=UTF-8' -d \
'{ '{
"name": "InfluxDB", "name": "InfluxDB",
"type": "influxdb", "type": "influxdb",
"url": "http://localhost:8086", "url": "http://localhost:8086",
"access": "proxy", "access": "proxy",
"isDefault": true, "isDefault": true,
"database": "jitsi" "database": "jitsi"
}' http://localhost:3000/api/datasources; echo "" }' http://localhost:3000/api/datasources; echo ""
echo " echo "

View File

@ -35,17 +35,17 @@ DIST=$(lsb_release -sc)
CHECK_GC_REPO=$(apt-cache policy | grep http | grep cloud-sdk | head -n1 | awk '{print $3}' | awk -F '/' '{print $1}') CHECK_GC_REPO=$(apt-cache policy | grep http | grep cloud-sdk | head -n1 | awk '{print $3}' | awk -F '/' '{print $1}')
install_gc_repo() { install_gc_repo() {
if [ "$CHECK_GC_REPO" = "cloud-sdk-$DIST" ]; then if [ "$CHECK_GC_REPO" = "cloud-sdk-$DIST" ]; then
echo " echo "
Google Cloud SDK repository already on the system! Google Cloud SDK repository already on the system!
" "
else else
echo " echo "
Adding Google Cloud SDK repository for latest updates Adding Google Cloud SDK repository for latest updates
" "
export CLOUD_SDK_REPO="cloud-sdk-$DIST" export CLOUD_SDK_REPO="cloud-sdk-$DIST"
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
fi fi
} }
@ -56,14 +56,14 @@ apt-get -y install google-cloud-sdk google-cloud-sdk-app-engine-java
echo "Please select one of the current options: echo "Please select one of the current options:
[1] I want to configure a new project, service account, billing and JSON credentials. [1] I want to configure a new project, service account, billing and JSON credentials.
[2] I already have one project configured and already have a JSON key file from Google" [2] I already have one project configured and already have a JSON key file from Google"
while [[ $SETUP_TYPE != 1 && $SETUP_TYPE != 2 ]] while [[ "$SETUP_TYPE" != "1" && "$SETUP_TYPE" != "2" ]]
do do
read -p "What option suits your setup?: (1 or 2)"$'\n' -r SETUP_TYPE read -p "What option suits your setup?: (1 or 2)"$'\n' -r SETUP_TYPE
if [ $SETUP_TYPE = 1 ]; then if [ "$SETUP_TYPE" = "1" ]; then
echo "We'll setup a GC Projects from scratch" echo "We'll setup a GC Projects from scratch"
elif [ $SETUP_TYPE = 2 ]; then elif [ "$SETUP_TYPE" = "2" ]; then
echo "We'll setup only the proect and JSON key." echo "We'll setup only the proect and JSON key."
fi fi
done done
if [ $SETUP_TYPE = 1 ]; then if [ $SETUP_TYPE = 1 ]; then
@ -84,10 +84,10 @@ while [ -z $PROJECT_GC_ID ]
do do
read -p "Enter the project name you just created for Jigasi Speech-to-Text"$'\n' -r GC_PROJECT_NAME read -p "Enter the project name you just created for Jigasi Speech-to-Text"$'\n' -r GC_PROJECT_NAME
if [ -z PROJECT_GC_ID ]; then if [ -z PROJECT_GC_ID ]; then
echo "Please check your project name, echo "Please check your project name,"
There is no project listed with the provided name: $GC_PROJECT_NAME" echo "There is no project listed with the provided name: $GC_PROJECT_NAME"
PROJECT_GC_ID=$(gcloud projects list | grep $GC_PROJECT_NAME | awk '{print$3}') PROJECT_GC_ID=$(gcloud projects list | grep $GC_PROJECT_NAME | awk '{print$3}')
fi fi
done done
echo "Your $GC_PROJECT_NAME ID's project is: $PROJECT_GC_ID" echo "Your $GC_PROJECT_NAME ID's project is: $PROJECT_GC_ID"
@ -101,8 +101,8 @@ while [[ $? -eq 1 ]]
do do
CHECK_BILLING="$(gcloud services enable speech.googleapis.com 2>/dev/null)" CHECK_BILLING="$(gcloud services enable speech.googleapis.com 2>/dev/null)"
if [[ $? -eq 1 ]]; then if [[ $? -eq 1 ]]; then
echo "Seems you haven't enabled billing for this project: $GC_PROJECT_NAME echo "Seems you haven't enabled billing for this project: $GC_PROJECT_NAME"
For that go to: https://console.developers.google.com/project/$PROJECT_GC_ID/settings exho " For that go to: https://console.developers.google.com/project/$PROJECT_GC_ID/settings
" "
read -p "Press Enter to continue" read -p "Press Enter to continue"
CHECK_BILLING="$(gcloud services enable speech.googleapis.com 2>/dev/null)" CHECK_BILLING="$(gcloud services enable speech.googleapis.com 2>/dev/null)"
@ -122,7 +122,7 @@ https://console.developers.google.com/apis/credentials?folder=&organizationId=&p
### End of new project configuration - Google SDK ### End of new project configuration - Google SDK
fi fi
if [ $SETUP_TYPE = 2 ]; then if [ "$SETUP_TYPE" = "2" ]; then
#Setup option 1 - Google Cloud SDK #Setup option 1 - Google Cloud SDK
echo "Once logged on Google Cloud SDK, please select the project that owns to the JSON key." echo "Once logged on Google Cloud SDK, please select the project that owns to the JSON key."
gcloud init gcloud init
@ -292,10 +292,10 @@ cat << JIG_JIC >> $JIC_SIP_PROP
org.jitsi.jicofo.jigasi.BREWERY=JigasiBreweryRoom@internal.auth.$DOMAIN org.jitsi.jicofo.jigasi.BREWERY=JigasiBreweryRoom@internal.auth.$DOMAIN
JIG_JIC JIG_JIC
systemctl restart prosody \ systemctl restart prosody \
jicofo \ jicofo \
jibri* \ jibri* \
jitsi-videobridge2 jitsi-videobridge2
echo " echo "
Full transcript files are available at: Full transcript files are available at:

View File

@ -15,9 +15,9 @@ if ! [ $(id -u) = 0 ]; then
exit 0 exit 0
fi 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..."
exit exit
fi fi
support="https://switnet.net/support" support="https://switnet.net/support"
apt_repo="/etc/apt/sources.list.d" apt_repo="/etc/apt/sources.list.d"
@ -26,7 +26,7 @@ ENABLE_BLESSM="TBD"
CHD_LTST="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)" 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="$(echo $CHD_LTST|cut -d "." -f 1,2)"
CHDB="$(whereis chromedriver | awk '{print$2}')" CHDB="$(whereis chromedriver | awk '{print$2}')"
DOMAIN="$(ls /etc/prosody/conf.d/ | grep -v localhost | awk -F'.cfg' '{print $1}' | awk '!NF || !seen[$0]++')" DOMAIN="$(ls /etc/prosody/conf.d|awk -F'.cfg' '!/localhost/{print $1}' | awk '!NF || !seen[$0]++')"
NC_DOMAIN="TBD" NC_DOMAIN="TBD"
JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf" JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf"
if [ -f $JITSI_MEET_PROXY ];then if [ -f $JITSI_MEET_PROXY ];then
@ -42,10 +42,10 @@ else
echo "Seems no Google repo installed" echo "Seems no Google repo installed"
fi fi
if [ -z $CHDB ]; then if [ -z $CHDB ]; then
echo "Seems no chromedriver installed" echo "Seems no chromedriver installed"
else else
CHD_VER_LOCAL="$($CHDB -v | awk '{print $2}')" CHD_VER_LOCAL="$($CHDB -v | awk '{print $2}')"
CHD_VER_2D="$(echo $CHD_VER_LOCAL|cut -d "." -f 1,2)" CHD_VER_2D="$(echo $CHD_VER_LOCAL|awk '{printf "%.1f\n", $NF}')"
fi fi
# True if $1 is greater than $2 # True if $1 is greater than $2
@ -54,20 +54,20 @@ version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
check_jibri() { check_jibri() {
if [ "$(dpkg-query -W -f='${Status}' "jibri" 2>/dev/null | grep -c "ok installed")" == "1" ] if [ "$(dpkg-query -W -f='${Status}' "jibri" 2>/dev/null | grep -c "ok installed")" == "1" ]
then then
systemctl restart jibri systemctl restart jibri
systemctl restart jibri-icewm systemctl restart jibri-icewm
systemctl restart jibri-xorg systemctl restart jibri-xorg
else else
echo "Jibri service not installed" echo "Jibri service not installed"
fi fi
} }
# Restarting services # Restarting services
restart_services() { restart_services() {
systemctl restart jitsi-videobridge2 systemctl restart jitsi-videobridge2
systemctl restart jicofo systemctl restart jicofo
check_jibri check_jibri
systemctl restart prosody systemctl restart prosody
} }
update_jitsi_repo() { update_jitsi_repo() {
@ -77,27 +77,27 @@ update_jitsi_repo() {
} }
update_google_repo() { update_google_repo() {
if [ -f $apt_repo/google-chrome.list ]; then if [ -f $apt_repo/google-chrome.list ]; then
apt-get update -o Dir::Etc::sourcelist="sources.list.d/google-chrome.list" \ apt-get update -o Dir::Etc::sourcelist="sources.list.d/google-chrome.list" \
-o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
apt-get install -qq --only-upgrade $google_package apt-get install -qq --only-upgrade $google_package
else else
echo "No Google repository found" echo "No Google repository found"
fi fi
} }
GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{print$3}'|cut -d "." -f 1,2)" GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{printf "%.1f\n", $NF}')"
upgrade_cd() { upgrade_cd() {
if [ ! -z $GOOGL_VER_2D ]; then if [ ! -z "$GOOGL_VER_2D" ]; then
if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" && \ if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" && \
[ "$GOOGL_VER_2D" = "$CHD_LTST_2D" ]; then [ "$GOOGL_VER_2D" = "$CHD_LTST_2D" ]; then
echo "Upgrading Chromedriver to Google Chromes version" echo "Upgrading Chromedriver to Google Chromes version"
wget -q https://chromedriver.storage.googleapis.com/$CHD_LTST/chromedriver_linux64.zip \ wget -q https://chromedriver.storage.googleapis.com/"$CHD_LTST"/chromedriver_linux64.zip \
-O /tmp/chromedriver_linux64.zip -O /tmp/chromedriver_linux64.zip
unzip -o /tmp/chromedriver_linux64.zip -d /usr/local/bin/ unzip -o /tmp/chromedriver_linux64.zip -d /usr/local/bin/
chown root:root $CHDB chown root:root "$CHDB"
chmod 0755 $CHDB chmod 0755 "$CHDB"
rm -rf /tpm/chromedriver_linux64.zip rm -rf /tpm/chromedriver_linux64.zip
printf "Current version: ${Green} "$($CHDB -v | awk '{print $2}'|cut -d "." -f 1,2)" ${Color_Off}\n" printf "Current version: ${Green} "$($CHDB -v |awk '{print $2}'|awk '{printf "%.1f\n", $NF}')" ${Color_Off}\n"
else else
echo "No need to upgrade Chromedriver" echo "No need to upgrade Chromedriver"
printf "Current version: ${Green} $CHD_VER_2D ${Color_Off}\n" printf "Current version: ${Green} $CHD_VER_2D ${Color_Off}\n"
@ -110,26 +110,26 @@ fi
check_lst_cd() { check_lst_cd() {
printf "${Purple}Checking for the latest Chromedriver${Color_Off}\n" printf "${Purple}Checking for the latest Chromedriver${Color_Off}\n"
if [ -f $CHDB ]; then if [ -f $CHDB ]; then
printf "Current installed Chromedriver: ${Yellow} $CHD_VER_2D ${Color_Off}\n" printf "Current installed Chromedriver: ${Yellow} $CHD_VER_2D ${Color_Off}\n"
printf "Current installed Google Chrome: ${Green} $GOOGL_VER_2D ${Color_Off}\n" printf "Current installed Google Chrome: ${Green} $GOOGL_VER_2D ${Color_Off}\n"
upgrade_cd upgrade_cd
else else
printf "${Yellow} -> Seems there is no Chromedriver installed${Color_Off}\n" printf "${Yellow} -> Seems there is no Chromedriver installed${Color_Off}\n"
fi fi
} }
printf "${Blue}Update & upgrade Jitsi and components${Color_Off}\n" printf "${Blue}Update & upgrade Jitsi and components${Color_Off}\n"
if [ -f $apt_repo/jitsi-unstable.list ]; then if [ -f $apt_repo/jitsi-unstable.list ]; then
update_jitsi_repo unstable update_jitsi_repo unstable
update_google_repo update_google_repo
check_lst_cd check_lst_cd
elif [ -f $apt_repo/jitsi-stable.list ]; then elif [ -f $apt_repo/jitsi-stable.list ]; then
update_jitsi_repo stable update_jitsi_repo stable
update_google_repo update_google_repo
check_lst_cd check_lst_cd
else else
echo "Please check your repositories, something is not right." echo "Please check your repositories, something is not right."
exit 1 exit 1
fi fi
# Any customization, image, name or link change for any purpose should # Any customization, image, name or link change for any purpose should
# be documented here so new updates won't remove those changes. # be documented here so new updates won't remove those changes.
@ -146,32 +146,28 @@ if [ -f "$INT_CONF_ETC" ]; then
echo "Static interface_config.js exists, skipping modification..." echo "Static interface_config.js exists, skipping modification..."
else else
echo "This setup doesn't have a static interface_config.js, checking changes..." echo "This setup doesn't have a static interface_config.js, checking changes..."
printf "${Purple}========== Setting Static Avatar ==========${Color_Off}\n" printf "${Purple}========== Setting Static Avatar ==========${Color_Off}\n"
if [[ -z "$AVATAR" ]]; then if [[ -z "$AVATAR" ]]; then
echo "Moving on..." echo "Moving on..."
else else
echo "Setting Static Avatar" echo "Setting Static Avatar"
sed -i "/RANDOM_AVATAR_URL_PREFIX/ s|false|\'http://$DOMAIN/avatar/\'|" $INT_CONF sed -i "/RANDOM_AVATAR_URL_PREFIX/ s|false|\'http://$DOMAIN/avatar/\'|" $INT_CONF
sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" $INT_CONF sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" $INT_CONF
fi fi
printf "${Purple}========== Setting Support Link ==========${Color_Off}\n"
printf "${Purple}========== Setting Support Link ==========${Color_Off}\n" if [[ -z $support ]]; then
if [[ -z $support ]]; then echo "Moving on..."
echo "Moving on..." else
else echo "Setting Support custom link"
echo "Setting Support custom link" sed -i "s|https://jitsi.org/live|$support|g" $INT_CONF
sed -i "s|https://jitsi.org/live|$support|g" $INT_CONF fi
fi printf "${Purple}========== Disable Localrecording ==========${Color_Off}\n"
if [ "$LOC_REC" != "on" ]; then
printf "${Purple}========== Disable Localrecording ==========${Color_Off}\n" echo "Removing localrecording..."
if [ "$LOC_REC" != "on" ]; then sed -i "s|'localrecording',||" $INT_CONF
echo "Removing localrecording..." fi
sed -i "s|'localrecording',||" $INT_CONF printf "${Purple}========== Disable Blur my background ==========${Color_Off}\n"
fi sed -i "s|'videobackgroundblur', ||" $INT_CONF
printf "${Purple}========== Disable Blur my background ==========${Color_Off}\n"
sed -i "s|'videobackgroundblur', ||" $INT_CONF
fi fi
if [ "$NC_DOMAIN" != "TBD" ]; then if [ "$NC_DOMAIN" != "TBD" ]; then
@ -181,21 +177,19 @@ printf "${Purple}========== Enable $NC_DOMAIN for sync client ==========${Color_
Setting up Nextcloud domain on Jitsi Meet turn proxy Setting up Nextcloud domain on Jitsi Meet turn proxy
" "
sed -i "/server {/i \ \ map \$ssl_preread_server_name \$upstream {" $JITSI_MEET_PROXY sed -i "/server {/i \ \ map \$ssl_preread_server_name \$upstream {" $JITSI_MEET_PROXY
sed -i "/server {/i \ \ \ \ \ \ $DOMAIN web;" $JITSI_MEET_PROXY sed -i "/server {/i \ \ \ \ \ \ $DOMAIN web;" $JITSI_MEET_PROXY
sed -i "/server {/i \ \ \ \ \ \ $NC_DOMAIN web;" $JITSI_MEET_PROXY sed -i "/server {/i \ \ \ \ \ \ $NC_DOMAIN web;" $JITSI_MEET_PROXY
sed -i "/server {/i \ \ }" $JITSI_MEET_PROXY sed -i "/server {/i \ \ }" $JITSI_MEET_PROXY
else else
echo "$NC_DOMAIN seems to be on place, skipping..." echo "$NC_DOMAIN seems to be on place, skipping..."
fi fi
fi fi
restart_services restart_services
######################################################################## ########################################################################
# Brandless mode # # Brandless mode #
######################################################################## ########################################################################
if [ $ENABLE_BLESSM = on ]; then if [ "$ENABLE_BLESSM" = "on" ]; then
bash $PWD/jm-bm.sh bash $PWD/jm-bm.sh
fi fi
printf "${Blue}Script completed \o/! ${Color_Off}\n" printf "${Blue}Script completed \o/! ${Color_Off}\n"

View File

@ -28,38 +28,38 @@ echo '
#-------------------------------------------------- #--------------------------------------------------
' '
#Watermark #Watermark
if [ ! -f $WTM2_PATH ]; then if [ ! -f "$WTM2_PATH" ]; then
cp images/watermark2.png $WTM2_PATH cp images/watermark2.png "$WTM2_PATH"
else else
echo "watermark2 file exists, skipping copying..." echo "watermark2 file exists, skipping copying..."
fi fi
#Favicon #Favicon
if [ ! -f $FICON_PATH ]; then if [ ! -f "$FICON_PATH" ]; then
cp images/favicon2.ico $FICON_PATH cp images/favicon2.ico "$FICON_PATH"
else else
echo "favicon2 file exists, skipping copying..." echo "favicon2 file exists, skipping copying..."
fi fi
#Local recording icon #Local recording icon
if [ ! -f $REC_ICON_PATH ];then if [ ! -f "$REC_ICON_PATH" ];then
cp images/gnome_record.png $REC_ICON_PATH cp images/gnome_record.png "$REC_ICON_PATH"
else else
echo "recodring icon exists, skipping copying..." echo "recodring icon exists, skipping copying..."
fi fi
#Custom / Remove icons #Custom / Remove icons
sed -i "s|watermark.png|watermark2.png|g" $CSS_FILE sed -i "s|watermark.png|watermark2.png|g" "$CSS_FILE"
sed -i "s|favicon.ico|favicon2.ico|g" $TITLE_FILE sed -i "s|favicon.ico|favicon2.ico|g" "$TITLE_FILE"
sed -i "s|jitsilogo.png|watermark2.png|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|logo-deep-linking.png|watermark2.png|g" "$BUNDLE_JS"
sed -i "s|jitsiLogo_square.png|gnome_record.png|g" $BUNDLE_JS sed -i "s|jitsiLogo_square.png|gnome_record.png|g" "$BUNDLE_JS"
#Disable logo and url #Disable logo and url
if [ -z "$(grep -nr ".leftwatermark{display:none" "$CSS_FILE")" ]; then if [ -z "$(grep -nr ".leftwatermark{display:none" "$CSS_FILE")" ]; then
sed -i "s|.leftwatermark{|.leftwatermark{display:none;|" $CSS_FILE sed -i "s|.leftwatermark{|.leftwatermark{display:none;|" "$CSS_FILE"
fi fi
#Customize room title #Customize room title
sed -i "s|Jitsi Meet|$APP_NAME|g" $TITLE_FILE sed -i "s|Jitsi Meet|$APP_NAME|g" "$TITLE_FILE"
sed -i "s| powered by the Jitsi Videobridge||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|" /usr/share/jitsi-meet/lang/*
#Custom UI changes #Custom UI changes
@ -67,13 +67,13 @@ if [ -f "$INT_CONF_ETC" ]; then
echo "Static interface_config.js exists, skipping modification..." echo "Static interface_config.js exists, skipping modification..."
else else
echo "This setup doesn't have a static interface_config.js, checking changes..." echo "This setup doesn't have a static interface_config.js, checking changes..."
echo -e "\nPlease note that brandless mode will also overwrite support links.\n" echo -e "\nPlease note that brandless mode will also overwrite support links.\n"
sed -i "21,32 s|Jitsi Meet|$APP_NAME|g" $INT_CONF sed -i "21,32 s|Jitsi Meet|$APP_NAME|g" "$INT_CONF"
sed -i "s|\([[:space:]]\)APP_NAME:.*| APP_NAME: \'$APP_NAME\',|" $INT_CONF sed -i "s|\([[:space:]]\)APP_NAME:.*| APP_NAME: \'$APP_NAME\',|" "$INT_CONF"
sed -i "s|Fellow Jitster|$PART_USER|g" $INT_CONF sed -i "s|Fellow Jitster|$PART_USER|g" "$INT_CONF"
sed -i "s|'me'|'$LOCAL_USER'|" $INT_CONF sed -i "s|'me'|'$LOCAL_USER'|" "$INT_CONF"
sed -i "s|LIVE_STREAMING_HELP_LINK: .*|LIVE_STREAMING_HELP_LINK: '#',|g" $INT_CONF sed -i "s|LIVE_STREAMING_HELP_LINK: .*|LIVE_STREAMING_HELP_LINK: '#',|g" "$INT_CONF"
sed -i "s|SUPPORT_URL: .*|SUPPORT_URL: '#',|g" $INT_CONF sed -i "s|SUPPORT_URL: .*|SUPPORT_URL: '#',|g" "$INT_CONF"
#Logo 2 #Logo 2
sed -i "s|watermark.png|watermark2.png|g" $INT_CONF sed -i "s|watermark.png|watermark2.png|g" "$INT_CONF"
fi fi

View File

@ -4,11 +4,11 @@
# GPLv3 or later. # GPLv3 or later.
while getopts m: option while getopts m: option
do do
case "${option}" case "${option}"
in in
m) MODE=${OPTARG};; m) MODE=${OPTARG};;
\?) echo "Usage: sudo ./jra_nextcloud.sh [-m debug]" && exit;; \?) echo "Usage: sudo ./jra_nextcloud.sh [-m debug]" && exit;;
esac esac
done done
#DEBUG #DEBUG
@ -22,10 +22,10 @@ if ! [ $(id -u) = 0 ]; then
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..."
echo " If you think this is an error, please report to: echo " If you think this is an error, please report to:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues " -> https://github.com/switnet-ltd/quick-jibri-installer/issues "
exit exit
fi fi
} }
clear clear
@ -63,40 +63,39 @@ fi
while [[ -z "$NC_DOMAIN" ]] while [[ -z "$NC_DOMAIN" ]]
do do
read -p "Please enter the domain to use for Nextcloud: " -r NC_DOMAIN read -p "Please enter the domain to use for Nextcloud: " -r NC_DOMAIN
if [ -z "$NC_DOMAIN" ];then if [ -z "$NC_DOMAIN" ];then
echo "-- This field is mandatory." echo "-- This field is mandatory."
elif [ "$NC_DOMAIN" = "$DOMAIN" ]; then elif [ "$NC_DOMAIN" = "$DOMAIN" ]; then
echo "-- You can not use the same domain for both, Jitsi Meet and JRA via Nextcloud." echo "-- You can not use the same domain for both, Jitsi Meet and JRA via Nextcloud."
fi fi
done done
NC_NGINX_CONF="/etc/nginx/sites-available/$NC_DOMAIN.conf" NC_NGINX_CONF="/etc/nginx/sites-available/$NC_DOMAIN.conf"
while [[ -z "$NC_USER" ]] while [[ -z "$NC_USER" ]]
do do
read -p "Nextcloud user: " -r NC_USER read -p "Nextcloud user: " -r NC_USER
if [ -z "$NC_USER" ]; then if [ -z "$NC_USER" ]; then
echo "-- This field is mandatory." echo "-- This field is mandatory."
fi fi
done done
while [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 6 ] while [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 6 ]
do do
read -p "Nextcloud user password: " -r NC_PASS read -p "Nextcloud user password: " -r NC_PASS
if [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 6 ]; then
if [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 6 ]; then echo -e "-- This field is mandatory. \nPlease make sure it's at least 6 caracters.\n"
echo -e "-- This field is mandatory. \nPlease make sure it's at least 6 caracters.\n" fi
fi
done done
#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) 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\" 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/"$'\n' -r ENABLE_HSTS in case you don't know what you are doing. More at https://hstspreload.org/"$'\n' -r ENABLE_HSTS
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
echo "-- HSTS will be enabled." echo "-- HSTS will be enabled."
fi fi
done done
echo -e "\n# Check for jitsi-meet/jibri\n" echo -e "\n# Check for jitsi-meet/jibri\n"
@ -111,31 +110,31 @@ fi
exit_ifinstalled() { 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 " This instance already has $1 installed, exiting..." echo " This instance already has $1 installed, exiting..."
echo " If you think this is an error, please report to: echo " If you think this is an error, please report to:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues " -> https://github.com/switnet-ltd/quick-jibri-installer/issues "
exit exit
fi fi
} }
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
echo " $1 is installed, skipping..." echo " $1 is installed, skipping..."
else else
echo -e "\n---- Installing $1 ----" echo -e "\n---- Installing $1 ----"
apt-get -yq2 install $1 apt-get -yq2 install $1
fi fi
} }
add_php74() { add_php74() {
if [ "$PHP_REPO" = "php" ]; then if [ "$PHP_REPO" = "php" ]; then
echo "PHP $PHPVER already installed" echo "PHP $PHPVER already installed"
apt-get -q2 update apt-get -q2 update
apt-get -yq2 dist-upgrade apt-get -yq2 dist-upgrade
else else
echo "# Adding Ondrej PHP $PHPVER PPA Repository" echo "# Adding Ondrej PHP $PHPVER PPA Repository"
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E5267A6C 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 echo "deb [arch=amd64] http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/php7x.list
apt-get update -q2 apt-get update -q2
fi fi
} }
#Prevent root folder permission issues #Prevent root folder permission issues
cp $PWD/files/jra-nc-app-ef.json /tmp cp $PWD/files/jra-nc-app-ef.json /tmp
@ -374,26 +373,26 @@ NC_NGINX
systemctl stop nginx systemctl stop nginx
letsencrypt certonly --standalone --renew-by-default --agree-tos -d $NC_DOMAIN letsencrypt certonly --standalone --renew-by-default --agree-tos -d $NC_DOMAIN
if [ -f /etc/letsencrypt/live/$NC_DOMAIN/fullchain.pem ];then if [ -f /etc/letsencrypt/live/$NC_DOMAIN/fullchain.pem ];then
ln -s $NC_NGINX_CONF /etc/nginx/sites-enabled/ ln -s $NC_NGINX_CONF /etc/nginx/sites-enabled/
else else
echo "There are issues on getting the SSL certs..." echo "There are issues on getting the SSL certs..."
read -n 1 -s -r -p "Press any key to continue" read -n 1 -s -r -p "Press any key to continue"
fi fi
nginx -t nginx -t
systemctl restart nginx systemctl restart nginx
if [ "$ENABLE_HSTS" = "yes" ]; then if [ "$ENABLE_HSTS" = "yes" ]; then
sed -i "s|# add_header Strict-Transport-Security|add_header Strict-Transport-Security|g" $NC_NGINX_CONF sed -i "s|# add_header Strict-Transport-Security|add_header Strict-Transport-Security|g" $NC_NGINX_CONF
fi fi
if [ "$DISTRO_RELEASE" != "xenial" ] && [ ! -z $PREAD_PROXY ]; then if [ "$DISTRO_RELEASE" != "xenial" ] && [ ! -z "$PREAD_PROXY" ]; then
echo " echo "
Setting up Nextcloud domain on Jitsi Meet turn proxy Setting up Nextcloud domain on Jitsi Meet turn proxy
" "
sed -i "/server {/i \ \ map \$ssl_preread_server_name \$upstream {" $JITSI_MEET_PROXY sed -i "/server {/i \ \ map \$ssl_preread_server_name \$upstream {" $JITSI_MEET_PROXY
sed -i "/server {/i \ \ \ \ \ \ $DOMAIN web;" $JITSI_MEET_PROXY sed -i "/server {/i \ \ \ \ \ \ $DOMAIN web;" $JITSI_MEET_PROXY
sed -i "/server {/i \ \ \ \ \ \ $NC_DOMAIN web;" $JITSI_MEET_PROXY sed -i "/server {/i \ \ \ \ \ \ $NC_DOMAIN web;" $JITSI_MEET_PROXY
sed -i "/server {/i \ \ }" $JITSI_MEET_PROXY sed -i "/server {/i \ \ }" $JITSI_MEET_PROXY
fi fi
echo " echo "

View File

@ -7,11 +7,11 @@ echo "Started at $(date +'%Y-%m-%d %H:%M:%S')" >> qj-installer.log
while getopts m: option while getopts m: option
do do
case "${option}" case "${option}"
in in
m) MODE=${OPTARG};; m) MODE=${OPTARG};;
\?) echo "Usage: sudo ./quick_jibri_installer.sh [-m debug]" && exit;; \?) echo "Usage: sudo ./quick_jibri_installer.sh [-m debug]" && exit;;
esac esac
done done
#DEBUG #DEBUG
@ -32,12 +32,12 @@ CR=`echo $'\n> '`
exit_ifinstalled() { 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 " echo "
This instance already has $1 installed, exiting... This instance already has $1 installed, exiting...
Please try again on a clean system. Please try again on a clean system.
If you think this is an error, please report to: If you think this is an error, please report to:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues" -> https://github.com/switnet-ltd/quick-jibri-installer/issues"
exit exit
fi fi
} }
exit_ifinstalled jitsi-meet exit_ifinstalled jitsi-meet
@ -50,18 +50,18 @@ DIST="bionic"
fi fi
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
echo " $1 is installed, skipping..." echo " $1 is installed, skipping..."
else else
echo -e "\n---- Installing $1 ----" echo -e "\n---- Installing $1 ----"
apt-get -yq2 install $1 apt-get -yq2 install $1
fi fi
} }
check_serv() { check_serv() {
if [ "$APACHE_2" -eq 1 ]; then if [ "$APACHE_2" -eq 1 ]; then
echo " echo "
The recommended setup is using NGINX, exiting... The recommended setup is using NGINX, exiting...
" "
exit exit
elif [ "$NGINX" -eq 1 ]; then elif [ "$NGINX" -eq 1 ]; then
echo " echo "
@ -69,10 +69,10 @@ Webserver already installed!
" "
else else
echo " echo "
Installing nginx webserver! Installing nginx webserver!
" "
install_ifnot nginx install_ifnot nginx
fi fi
} }
check_snd_driver() { check_snd_driver() {
@ -80,12 +80,12 @@ 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 | grep snd_aloop | head -n 1 | cut -d " " -f1)" = "snd_aloop" ]; then if [ "$(lsmod | grep snd_aloop | head -n 1 | cut -d " " -f1)" = "snd_aloop" ]; then
echo " echo "
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# Audio driver seems - OK. # Audio driver seems - OK.
#-----------------------------------------------------------------------" #-----------------------------------------------------------------------"
else else
echo " echo "
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# Your audio driver might not be able to load. # Your audio driver might not be able to load.
# We'll check the state of this Jibri with our 'test-jibri-env.sh' tool. # We'll check the state of this Jibri with our 'test-jibri-env.sh' tool.
@ -106,10 +106,10 @@ var_dlim() {
add_prosody_repo() { add_prosody_repo() {
echo "Add Prosody repo" echo "Add Prosody repo"
if [ "$PROSODY_REPO" = "main" ]; then if [ "$PROSODY_REPO" = "main" ]; then
echo "Prosody repository already installed" echo "Prosody repository already installed"
else else
echo "deb http://packages.prosody.im/debian $(lsb_release -sc) main" > /etc/apt/sources.list.d/prosody.list 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 - wget -qO - https://prosody.im/files/prosody-debian-packages.key | apt-key add -
fi fi
} }
dpkg-compare() { dpkg-compare() {
@ -151,12 +151,12 @@ fi
if [ "$DIST" = "xenial" ] || \ if [ "$DIST" = "xenial" ] || \
[ "$DIST" = "bionic" ] || \ [ "$DIST" = "bionic" ] || \
[ "$DIST" = "focal" ]; then [ "$DIST" = "focal" ]; then
echo "OS: $(lsb_release -sd)" echo "OS: $(lsb_release -sd)"
echo "Good, this is a supported platform!" echo "Good, this is a supported platform!"
else else
echo "OS: $(lsb_release -sd)" echo "OS: $(lsb_release -sd)"
echo "Sorry, this platform is not supported... exiting" echo "Sorry, this platform is not supported... exiting"
exit exit
fi fi
#Suggest 18.04 LTS release over 16.04 #Suggest 18.04 LTS release over 16.04
if [ "$DIST" = "xenial" ]; then if [ "$DIST" = "xenial" ]; then
@ -243,11 +243,11 @@ add_prosody_repo
# Jitsi-Meet Repo # Jitsi-Meet Repo
echo -e "\nAdd Jitsi repo\n" echo -e "\nAdd Jitsi repo\n"
if [ "$JITSI_REPO" = "stable" ]; then if [ "$JITSI_REPO" = "stable" ]; then
echo "Jitsi stable repository already installed" echo "Jitsi stable repository already installed"
else else
echo 'deb http://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list 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 - wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add -
JITSI_REPO="stable" JITSI_REPO="stable"
fi fi
#Default to LE SSL? #Default to LE SSL?
while [[ "$LE_SSL" != "yes" && "$LE_SSL" != "no" ]] while [[ "$LE_SSL" != "yes" && "$LE_SSL" != "no" ]]
@ -266,22 +266,26 @@ if [ "$LE_SSL" = "yes" ]; then
do do
read -p "> Please set your domain (or subdmain) here: (e.g.: jitsi.domain.com)"$'\n' -r JITSI_DOMAIN read -p "> Please set your domain (or subdmain) here: (e.g.: jitsi.domain.com)"$'\n' -r JITSI_DOMAIN
read -p "> Did you mean?: $JITSI_DOMAIN (yes or no)"$'\n' -r ANS_JD read -p "> Did you mean?: $JITSI_DOMAIN (yes or no)"$'\n' -r ANS_JD
if [ "$ANS_JD" = "yes" ]; then if [ "$ANS_JD" = "yes" ]; then
echo "Alright, let's use $JITSI_DOMAIN." echo "Alright, let's use $JITSI_DOMAIN."
else else
echo "Please try again." echo "Please try again."
fi fi
done done
#Simple DNS test #Simple DNS test
if [ "$PUBLIC_IP" = "$(dig -4 +short $JITSI_DOMAIN)" ]; then if [ "$PUBLIC_IP" = "$(dig -4 +short $JITSI_DOMAIN)" ]; then
echo "Server public IP & DNS record for $JITSI_DOMAIN seems to match, continuing... echo "Server public IP & DNS record for $JITSI_DOMAIN seems to match, continuing...
" "
else else
echo "Server public IP ($PUBLIC_IP) & DNS record for $JITSI_DOMAIN don't seem to match." echo "Server public IP ($PUBLIC_IP) & DNS record for $JITSI_DOMAIN don't seem to match."
echo "Please check your dns records are applied and updated. Exiting for now... echo " > Please check your dns records are applied and updated, otherwise components may fail."
" read -p " > Do you want to continue?: (yes or no)"$'\n' -r DNS_CONTINUE
exit if [ "$DNS_CONTINUE" = "yes" ]; then
echo " - We'll continue anyway..."
else
echo " - Exiting for now..."
exit
fi
fi fi
fi fi
# Requirements # Requirements
@ -290,22 +294,22 @@ apt-get update -q2
apt-get dist-upgrade -yq2 apt-get dist-upgrade -yq2
apt-get -y install \ apt-get -y install \
apt-show-versions \ apt-show-versions \
bmon \ bmon \
curl \ curl \
ffmpeg \ ffmpeg \
git \ git \
htop \ htop \
jq \ jq \
net-tools \ net-tools \
rsync \ rsync \
ssh \ ssh \
unzip \ unzip \
wget wget
if [ "$LE_SSL" = "yes" ]; then if [ "$LE_SSL" = "yes" ]; then
apt-get -y install \ apt-get -y install \
letsencrypt letsencrypt
fi fi
echo "# Check and Install HWE kernel if possible..." echo "# Check and Install HWE kernel if possible..."
@ -313,7 +317,7 @@ HWE_VIR_MOD=$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr) 2>/de
if [ "$HWE_VIR_MOD" = "1" ]; then if [ "$HWE_VIR_MOD" = "1" ]; then
apt-get -y install \ apt-get -y install \
linux-image-generic-hwe-$(lsb_release -sr) linux-image-generic-hwe-$(lsb_release -sr)
else else
apt-get -y install \ apt-get -y install \
linux-image-generic \ linux-image-generic \
linux-modules-extra-$(uname -r) linux-modules-extra-$(uname -r)
@ -327,13 +331,13 @@ echo "
#-------------------------------------------------- #--------------------------------------------------
" "
if [ "$LE_SSL" = "yes" ]; then if [ "$LE_SSL" = "yes" ]; then
echo "set jitsi-meet/cert-choice select Generate a new self-signed certificate (You will later get a chance to obtain a Let's encrypt certificate)" | debconf-set-selections echo "set jitsi-meet/cert-choice select Generate a new self-signed certificate (You will later get a chance to obtain a Let's encrypt certificate)" | debconf-set-selections
echo "jitsi-videobridge2 jitsi-videobridge/jvb-hostname string $JITSI_DOMAIN" | debconf-set-selections echo "jitsi-videobridge2 jitsi-videobridge/jvb-hostname string $JITSI_DOMAIN" | debconf-set-selections
fi fi
apt-get -y install \ apt-get -y install \
jitsi-meet \ jitsi-meet \
jibri \ jibri \
openjdk-8-jre-headless openjdk-8-jre-headless
# Fix RAND_load_file error # Fix RAND_load_file error
#https://github.com/openssl/openssl/issues/7754#issuecomment-444063355 #https://github.com/openssl/openssl/issues/7754#issuecomment-444063355
@ -345,19 +349,19 @@ echo "
#-------------------------------------------------- #--------------------------------------------------
" "
if [ "$(dpkg-query -W -f='${Status}' nodejs 2>/dev/null | grep -c "ok")" == "1" ]; then if [ "$(dpkg-query -W -f='${Status}' nodejs 2>/dev/null | grep -c "ok")" == "1" ]; then
echo "Nodejs is installed, skipping..." echo "Nodejs is installed, skipping..."
else else
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
apt-get install -yq2 nodejs apt-get install -yq2 nodejs
echo "Installing nodejs esprima package..." echo "Installing nodejs esprima package..."
npm install -g esprima npm install -g esprima
fi fi
if [ "$(npm list -g esprima 2>/dev/null | grep -c "empty")" == "1" ]; then if [ "$(npm list -g esprima 2>/dev/null | grep -c "empty")" == "1" ]; then
echo "Installing nodejs esprima package..." echo "Installing nodejs esprima package..."
npm install -g esprima npm install -g esprima
elif [ "$(npm list -g esprima 2>/dev/null | grep -c "esprima")" == "1" ]; then 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
CHD_LTST=$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE) CHD_LTST=$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)
@ -365,26 +369,26 @@ GCMP_JSON="/etc/opt/chrome/policies/managed/managed_policies.json"
echo "# Installing Google Chrome / ChromeDriver" echo "# 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
echo "Installing Google Chrome Stable" echo "Installing Google Chrome Stable"
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | tee $GOOGL_REPO 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 -yq2 google-chrome-stable
rm -rf /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list rm -rf /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list
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 https://chromedriver.storage.googleapis.com/$CHD_LTST/chromedriver_linux64.zip \ wget -q https://chromedriver.storage.googleapis.com/$CHD_LTST/chromedriver_linux64.zip \
-O /tmp/chromedriver_linux64.zip -O /tmp/chromedriver_linux64.zip
unzip -o /tmp/chromedriver_linux64.zip -d /usr/local/bin/ unzip -o /tmp/chromedriver_linux64.zip -d /usr/local/bin/
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 /tpm/chromedriver_linux64.zip rm -rf /tpm/chromedriver_linux64.zip
fi fi
echo " echo "
@ -464,61 +468,61 @@ read -p "Leave empty to use the default one (English): "$'\n' L10N_ME
#Drop unsecure TLS #Drop unsecure TLS
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)"$'\n' -r DROP_TLS1 read -p "> Do you want to drop support for unsecure protocols TLSv1.0/1.1 now: (yes or no)"$'\n' -r DROP_TLS1
if [ "$DROP_TLS1" = "no" ]; then if [ "$DROP_TLS1" = "no" ]; then
echo "TLSv1.0/1.1 will remain." echo "TLSv1.0/1.1 will remain."
elif [ "$DROP_TLS1" = "yes" ]; then elif [ "$DROP_TLS1" = "yes" ]; then
echo "TLSv1.0/1.1 will be dropped" echo "TLSv1.0/1.1 will be dropped"
fi fi
done done
#Dropbox -- no longer requirement for localrecording #Dropbox -- no longer requirement for localrecording
#while [[ $ENABLE_DB != yes && $ENABLE_DB != no ]] #while [[ $ENABLE_DB != yes && $ENABLE_DB != no ]]
#do #do
#read -p "> Do you want to setup the Dropbox feature now: (yes or no)"$'\n' -r ENABLE_DB #read -p "> Do you want to setup the Dropbox feature now: (yes or no)"$'\n' -r ENABLE_DB
#if [ $ENABLE_DB = no ]; then #if [ $ENABLE_DB = no ]; then
# echo "Dropbox won't be enable" # echo "Dropbox won't be enable"
#elif [ $ENABLE_DB = yes ]; then #elif [ $ENABLE_DB = yes ]; then
# read -p "Please set your Drobbox App key: "$'\n' -r DB_CID # read -p "Please set your Drobbox App key: "$'\n' -r DB_CID
#fi #fi
#done #done
#Brandless Mode #Brandless Mode
while [[ "$ENABLE_BLESSM" != "yes" && "$ENABLE_BLESSM" != "no" ]] while [[ "$ENABLE_BLESSM" != "yes" && "$ENABLE_BLESSM" != "no" ]]
do do
read -p "> Do you want to install customized \"brandless mode\"?: (yes or no)"$'\n' -r ENABLE_BLESSM read -p "> Do you want to install customized \"brandless mode\"?: (yes or no)"$'\n' -r ENABLE_BLESSM
if [ "$ENABLE_BLESSM" = "no" ]; then if [ "$ENABLE_BLESSM" = "no" ]; then
echo "Brandless mode won't be set." echo "Brandless mode won't be set."
elif [ "$ENABLE_BLESSM" = "yes" ]; then elif [ "$ENABLE_BLESSM" = "yes" ]; then
echo "Brandless mode will be set." echo "Brandless mode will be set."
fi fi
done done
#Welcome Page #Welcome Page
while [[ "$ENABLE_WELCP" != "yes" && "$ENABLE_WELCP" != "no" ]] while [[ "$ENABLE_WELCP" != "yes" && "$ENABLE_WELCP" != "no" ]]
do do
read -p "> Do you want to disable the Welcome page: (yes or no)"$'\n' -r ENABLE_WELCP read -p "> Do you want to disable the Welcome page: (yes or no)"$'\n' -r ENABLE_WELCP
if [ "$ENABLE_WELCP" = "yes" ]; then if [ "$ENABLE_WELCP" = "yes" ]; then
echo "Welcome page will be disabled." echo "Welcome page will be disabled."
elif [ "$ENABLE_WELCP" = "no" ]; then elif [ "$ENABLE_WELCP" = "no" ]; then
echo "Welcome page will be enabled." echo "Welcome page will be enabled."
fi fi
done done
#Enable static avatar #Enable static avatar
while [[ "$ENABLE_SA" != "yes" && "$ENABLE_SA" != "no" ]] while [[ "$ENABLE_SA" != "yes" && "$ENABLE_SA" != "no" ]]
do do
read -p "> (Legacy) Do you want to enable static avatar?: (yes or no)"$'\n' -r ENABLE_SA read -p "> (Legacy) Do you want to enable static avatar?: (yes or no)"$'\n' -r ENABLE_SA
if [ "$ENABLE_SA" = "no" ]; then if [ "$ENABLE_SA" = "no" ]; then
echo "Static avatar won't be enabled" echo "Static avatar won't be enabled"
elif [ "$ENABLE_SA" = "yes" ]; then elif [ "$ENABLE_SA" = "yes" ]; then
echo "Static avatar will be enabled" echo "Static avatar will be enabled"
fi fi
done done
# #Enable local audio recording - disabling # #Enable local audio recording - disabling
#while [[ "$ENABLE_LAR" != "yes" && "$ENABLE_LAR" != "no" ]] #while [[ "$ENABLE_LAR" != "yes" && "$ENABLE_LAR" != "no" ]]
#do #do
#read -p "> Do you want to enable local audio recording option?: (yes or no)"$'\n' -r ENABLE_LAR #read -p "> Do you want to enable local audio recording option?: (yes or no)"$'\n' -r ENABLE_LAR
#if [ "$ENABLE_LAR" = "no" ]; then #if [ "$ENABLE_LAR" = "no" ]; then
# echo "Local audio recording option won't be enabled" # echo "Local audio recording option won't be enabled"
#elif [ "$ENABLE_LAR" = "yes" ]; then #elif [ "$ENABLE_LAR" = "yes" ]; then
# echo "Local audio recording option will be enabled" # echo "Local audio recording option will be enabled"
#fi #fi
#done #done
@ -527,11 +531,11 @@ done
#do #do
#read -p "> Do you want to enable secure rooms?: (yes or no)"$'\n' -r ENABLE_SC #read -p "> Do you want to enable secure rooms?: (yes or no)"$'\n' -r ENABLE_SC
#if [ "$ENABLE_SC" = "no" ]; then #if [ "$ENABLE_SC" = "no" ]; then
# echo "-- Secure rooms won't be enabled." # echo "-- Secure rooms won't be enabled."
#elif [ "$ENABLE_SC" = "yes" ]; then #elif [ "$ENABLE_SC" = "yes" ]; then
# echo "-- Secure rooms will be enabled." # echo "-- Secure rooms will be enabled."
# read -p "Set username for secure room moderator: "$'\n' -r SEC_ROOM_USER # read -p "Set username for secure room moderator: "$'\n' -r SEC_ROOM_USER
# read -p "Secure room moderator password: "$'\n' -r SEC_ROOM_PASS # read -p "Secure room moderator password: "$'\n' -r SEC_ROOM_PASS
#fi #fi
#done #done
echo " echo "
@ -563,32 +567,32 @@ done
#Jibri Records Access (JRA) via Nextcloud #Jibri Records Access (JRA) via Nextcloud
while [[ "$ENABLE_NC_ACCESS" != "yes" && "$ENABLE_NC_ACCESS" != "no" ]] while [[ "$ENABLE_NC_ACCESS" != "yes" && "$ENABLE_NC_ACCESS" != "no" ]]
do do
read -p "> Do you want to setup Jibri Records Access via Nextcloud: (yes or no) read -p "> Do you want to setup Jibri Records Access via Nextcloud: (yes or no)
( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_NC_ACCESS ( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_NC_ACCESS
if [ "$ENABLE_NC_ACCESS" = "no" ]; then if [ "$ENABLE_NC_ACCESS" = "no" ]; then
echo -e "-- JRA via Nextcloud won't be enabled.\n" echo -e "-- JRA via Nextcloud won't be enabled.\n"
elif [ "$ENABLE_NC_ACCESS" = "yes" ]; then elif [ "$ENABLE_NC_ACCESS" = "yes" ]; then
echo -e "-- JRA via Nextcloud will be enabled.\n" echo -e "-- JRA via Nextcloud will be enabled.\n"
fi fi
done done
#Jigasi #Jigasi
if [ "$(curl -s -o /dev/null -w "%{http_code}" $GC_SDK_REL_FILE )" == "404" ]; then if [ "$(curl -s -o /dev/null -w "%{http_code}" $GC_SDK_REL_FILE )" == "404" ]; then
echo "> Sorry Google SDK doesn't have support yet for $(lsb_release -sd), echo "> Sorry Google SDK doesn't have support yet for $(lsb_release -sd),
thus, Jigasi Transcript can't be enable. thus, Jigasi Transcript can't be enable.
" "
elif [ "$(curl -s -o /dev/null -w "%{http_code}" $GC_SDK_REL_FILE )" == "200" ]; then elif [ "$(curl -s -o /dev/null -w "%{http_code}" $GC_SDK_REL_FILE )" == "200" ]; then
while [[ "$ENABLE_TRANSCRIPT" != "yes" && "$ENABLE_TRANSCRIPT" != "no" ]] while [[ "$ENABLE_TRANSCRIPT" != "yes" && "$ENABLE_TRANSCRIPT" != "no" ]]
do do
read -p "> Do you want to setup Jigasi Transcription: (yes or no) read -p "> Do you want to setup Jigasi Transcription: (yes or no)
( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_TRANSCRIPT ( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_TRANSCRIPT
if [ "$ENABLE_TRANSCRIPT" = "no" ]; then if [ "$ENABLE_TRANSCRIPT" = "no" ]; then
echo -e "-- Jigasi Transcription won't be enabled.\n" echo -e "-- Jigasi Transcription won't be enabled.\n"
elif [ "$ENABLE_TRANSCRIPT" = "yes" ]; then elif [ "$ENABLE_TRANSCRIPT" = "yes" ]; then
echo -e "-- Jigasi Transcription will be enabled.\n" echo -e "-- Jigasi Transcription will be enabled.\n"
fi fi
done done
else else
echo "No valid option for Jigasi. Please report this to echo "No valid option for Jigasi. Please report this to
https://github.com/switnet-ltd/quick-jibri-installer/issues " https://github.com/switnet-ltd/quick-jibri-installer/issues "
fi fi
#Grafana #Grafana
@ -597,9 +601,9 @@ do
read -p "> Do you want to setup Grafana Dashboard: (yes or no) read -p "> Do you want to setup Grafana Dashboard: (yes or no)
( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_GRAFANA_DSH ( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_GRAFANA_DSH
if [ "$ENABLE_GRAFANA_DSH" = "no" ]; then if [ "$ENABLE_GRAFANA_DSH" = "no" ]; then
echo -e "-- Grafana Dashboard won't be enabled.\n" echo -e "-- Grafana Dashboard won't be enabled.\n"
elif [ "$ENABLE_GRAFANA_DSH" = "yes" ]; then elif [ "$ENABLE_GRAFANA_DSH" = "yes" ]; then
echo -e "-- Grafana Dashboard will be enabled. \n" echo -e "-- Grafana Dashboard will be enabled. \n"
fi fi
done done
#Docker Etherpad #Docker Etherpad
@ -608,9 +612,9 @@ done
#read -p "> Do you want to setup Docker Etherpad: (yes or no) #read -p "> Do you want to setup Docker Etherpad: (yes or no)
#( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_DOCKERPAD #( Please check requirements at: https://github.com/switnet-ltd/quick-jibri-installer )"$'\n' -r ENABLE_DOCKERPAD
#if [ "$ENABLE_DOCKERPAD" = "no" ]; then #if [ "$ENABLE_DOCKERPAD" = "no" ]; then
# echo -e "-- Docker Etherpad won't be enabled.\n" # echo -e "-- Docker Etherpad won't be enabled.\n"
#elif [ "$ENABLE_DOCKERPAD" = "yes" ]; then #elif [ "$ENABLE_DOCKERPAD" = "yes" ]; then
# echo -e "-- Docker Etherpad will be enabled.\n" # echo -e "-- Docker Etherpad will be enabled.\n"
#fi #fi
#done #done
#Start configuration #Start configuration
@ -627,19 +631,19 @@ WAN_IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
ssl_wa() { ssl_wa() {
if [ "$LE_SSL" = "yes" ]; then if [ "$LE_SSL" = "yes" ]; then
systemctl stop $1 systemctl stop $1
letsencrypt certonly --standalone --renew-by-default --agree-tos --email $5 -d $6 letsencrypt 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.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
#Add cron #Add cron
crontab -l | { cat; echo "@weekly certbot renew --${2} > $LE_RENEW_LOG 2>&1"; } | crontab - crontab -l | { cat; echo "@weekly certbot renew --${2} > $LE_RENEW_LOG 2>&1"; } | crontab -
crontab -l crontab -l
fi fi
} }
enable_letsencrypt() { enable_letsencrypt() {
if [ "$LE_SSL" = "yes" ]; then if [ "$LE_SSL" = "yes" ]; then
echo ' echo '
#-------------------------------------------------- #--------------------------------------------------
# Starting LetsEncrypt configuration # Starting LetsEncrypt configuration
#-------------------------------------------------- #--------------------------------------------------
@ -647,43 +651,42 @@ if [ "$LE_SSL" = "yes" ]; then
#Disabled 'til fixed upstream #Disabled 'til fixed upstream
#bash /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh #bash /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh
echo "#Set and upgrade certbot PPA if posssible..." echo "#Set and upgrade certbot PPA if posssible..."
if [ "$CERTBOT_REPO" = "certbot" ]; then if [ "$CERTBOT_REPO" = "certbot" ]; then
echo -e "\nCerbot repository already on the system!\nChecking for updates...\n" echo -e "\nCerbot repository already on the system!\nChecking for updates...\n"
apt-get -q2 update apt-get -q2 update
apt-get -yq2 dist-upgrade apt-get -yq2 dist-upgrade
elif [ "$(curl -s -o /dev/null -w "%{http_code}" $CERTBOT_REL_FILE )" == "200" ]; then elif [ "$(curl -s -o /dev/null -w "%{http_code}" $CERTBOT_REL_FILE )" == "200" ]; then
echo -e "\nAdding cerbot (formerly letsencrypt) PPA repository for latest updates\n" echo -e "\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 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-key adv --keyserver keyserver.ubuntu.com --recv-keys 75BCA694
apt-get -q2 update apt-get -q2 update
apt-get -yq2 dist-upgrade apt-get -yq2 dist-upgrade
elif [ "$(curl -s -o /dev/null -w "%{http_code}" $CERTBOT_REL_FILE )" == "404" ]; then elif [ "$(curl -s -o /dev/null -w "%{http_code}" $CERTBOT_REL_FILE )" == "404" ]; then
echo -e "\nCertbot PPA is not available for $(lsb_release -sc) just yet, it won't be installed...\n" echo -e "\nCertbot PPA is not available for $(lsb_release -sc) just yet, it won't be installed...\n"
fi fi
else else
echo "SSL setup will be skipped." echo "SSL setup will be skipped."
fi fi
} }
check_jibri() { check_jibri() {
if [ "$(dpkg-query -W -f='${Status}' "jibri" 2>/dev/null | grep -c "ok installed")" == "1" ] if [ "$(dpkg-query -W -f='${Status}' "jibri" 2>/dev/null | grep -c "ok installed")" == "1" ]
then then
systemctl restart jibri systemctl restart jibri
systemctl restart jibri-icewm systemctl restart jibri-icewm
systemctl restart jibri-xorg systemctl restart jibri-xorg
else else
echo "Jibri service not installed" echo "Jibri service not installed"
fi fi
} }
# Restarting services # Restarting services
restart_services() { restart_services() {
systemctl restart jitsi-videobridge2 systemctl restart jitsi-videobridge2
systemctl restart jicofo systemctl restart jicofo
systemctl restart prosody systemctl restart prosody
check_jibri check_jibri
} }
# Configure Jvb2 # Configure Jvb2
@ -722,10 +725,10 @@ sed -i "/c2s_require_encryption = false/a \\
consider_bosh_secure = true" $PROSODY_SYS consider_bosh_secure = true" $PROSODY_SYS
if [ ! -z $L10N_PARTICIPANT ]; then if [ ! -z $L10N_PARTICIPANT ]; then
sed -i "s|PART_USER=.*|PART_USER=\"$L10N_PARTICIPANT\"|" jm-bm.sh sed -i "s|PART_USER=.*|PART_USER=\"$L10N_PARTICIPANT\"|" jm-bm.sh
fi fi
if [ ! -z $L10N_ME ]; then if [ ! -z $L10N_ME ]; then
sed -i "s|LOCAL_USER=.*|LOCAL_USER=\"$L10N_ME\"|" jm-bm.sh sed -i "s|LOCAL_USER=.*|LOCAL_USER=\"$L10N_ME\"|" jm-bm.sh
fi fi
@ -761,30 +764,29 @@ sed -i "s|// liveStreamingEnabled: false,|liveStreamingEnabled: true,\\
#LocalAudioRecording #LocalAudioRecording
if [ "$ENABLE_LAR" = "yes" ]; then if [ "$ENABLE_LAR" = "yes" ]; then
echo "# Enabling local recording (audio only)." echo "# Enabling local recording (audio only)."
LR_STR=$(grep -n "// Local Recording" $MEET_CONF | cut -d ":" -f1) LR_STR=$(grep -n "// Local Recording" $MEET_CONF | cut -d ":" -f1)
LR_END=$((LR_STR + 18)) LR_END=$((LR_STR + 18))
sed -i "$LR_STR,$LR_END{s|// localRecording: {|localRecording: {|}" $MEET_CONF sed -i "$LR_STR,$LR_END{s|// localRecording: {|localRecording: {|}" $MEET_CONF
sed -i "$LR_STR,$LR_END{s|// enabled: true,|enabled: true,|}" $MEET_CONF sed -i "$LR_STR,$LR_END{s|// enabled: true,|enabled: true,|}" $MEET_CONF
sed -i "$LR_STR,$LR_END{s|// format: 'flac'|format: 'flac'|}" $MEET_CONF sed -i "$LR_STR,$LR_END{s|// format: 'flac'|format: 'flac'|}" $MEET_CONF
sed -i "$LR_STR,$LR_END{s|// }|}|}" $MEET_CONF sed -i "$LR_STR,$LR_END{s|// }|}|}" $MEET_CONF
sed -i "s|'tileview'|'tileview', 'localrecording'|" $INT_CONF
sed -i "s|'tileview'|'tileview', 'localrecording'|" $INT_CONF sed -i "s|LOC_REC=.*|LOC_REC=\"on\"|" jitsi-updater.sh
sed -i "s|LOC_REC=.*|LOC_REC=\"on\"|" jitsi-updater.sh
fi fi
#Setup main language #Setup main language
if [ -z $JB_LANG ] || [ "$JB_LANG" = "en" ]; then if [ -z $JB_LANG ] || [ "$JB_LANG" = "en" ]; then
echo "Leaving English (en) as default language..." echo "Leaving English (en) as default language..."
sed -i "s|// defaultLanguage: 'en',|defaultLanguage: 'en',|" $MEET_CONF sed -i "s|// defaultLanguage: 'en',|defaultLanguage: 'en',|" $MEET_CONF
else else
echo "Changing default language to: $JB_LANG" echo "Changing default language to: $JB_LANG"
sed -i "s|// defaultLanguage: 'en',|defaultLanguage: \'$JB_LANG\',|" $MEET_CONF sed -i "s|// defaultLanguage: 'en',|defaultLanguage: \'$JB_LANG\',|" $MEET_CONF
fi fi
# 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
@ -836,57 +838,57 @@ jibri {
xmpp { xmpp {
environments = [ environments = [
{ {
// A user-friendly name for this environment // A user-friendly name for this environment
name = "$JB_NAME" name = "$JB_NAME"
// A list of XMPP server hosts to which we'll connect // A list of XMPP server hosts to which we'll connect
xmpp-server-hosts = [ "$DOMAIN" ] xmpp-server-hosts = [ "$DOMAIN" ]
// The base XMPP domain // The base XMPP domain
xmpp-domain = "$DOMAIN" xmpp-domain = "$DOMAIN"
// The MUC we'll join to announce our presence for // The MUC we'll join to announce our presence for
// recording and streaming services // recording and streaming services
control-muc { control-muc {
domain = "internal.auth.$DOMAIN" domain = "internal.auth.$DOMAIN"
room-name = "$JibriBrewery" room-name = "$JibriBrewery"
nickname = "Live" nickname = "Live"
} }
// The login information for the control MUC // The login information for the control MUC
control-login { control-login {
domain = "auth.$DOMAIN" domain = "auth.$DOMAIN"
username = "jibri" username = "jibri"
password = "$JB_AUTH_PASS" password = "$JB_AUTH_PASS"
} }
// An (optional) MUC configuration where we'll // An (optional) MUC configuration where we'll
// join to announce SIP gateway services // join to announce SIP gateway services
// sip-control-muc { // sip-control-muc {
// domain = "domain" // domain = "domain"
// room-name = "room-name" // room-name = "room-name"
// nickname = "nickname" // nickname = "nickname"
// } // }
// The login information the selenium web client will use // The login information the selenium web client will use
call-login { call-login {
domain = "recorder.$DOMAIN" domain = "recorder.$DOMAIN"
username = "recorder" username = "recorder"
password = "$JB_REC_PASS" password = "$JB_REC_PASS"
} }
// The value we'll strip from the room JID domain to derive // The value we'll strip from the room JID domain to derive
// the call URL // the call URL
strip-from-room-domain = "conference." strip-from-room-domain = "conference."
// How long Jibri sessions will be allowed to last before // How long Jibri sessions will be allowed to last before
// they are stopped. A value of 0 allows them to go on // they are stopped. A value of 0 allows them to go on
// indefinitely // indefinitely
usage-timeout = 0 hour usage-timeout = 0 hour
// Whether or not we'll automatically trust any cert on // Whether or not we'll automatically trust any cert on
// this XMPP domain // this XMPP domain
trust-all-xmpp-certs = true trust-all-xmpp-certs = true
} }
] ]
} }
@ -963,40 +965,40 @@ sed -i "s|MJS_USER_PASS=.*|MJS_USER_PASS=\"$MJS_USER_PASS\"|" add-jvb2-node.sh
#Tune webserver for Jitsi App control #Tune webserver for Jitsi App control
if [ -f $WS_CONF ]; then if [ -f $WS_CONF ]; then
sed -i "/Anything that didn't match above/i \\\n" $WS_CONF sed -i "/Anything that didn't match above/i \\\n" $WS_CONF
sed -i "/Anything that didn't match above/i \ \ \ \ location = \/external_api.min.js {" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ location = \/external_api.min.js {" $WS_CONF
sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ alias \/usr\/share\/jitsi-meet\/libs\/external_api.min.js;" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ alias \/usr\/share\/jitsi-meet\/libs\/external_api.min.js;" $WS_CONF
sed -i "/Anything that didn't match above/i \ \ \ \ }" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ }" $WS_CONF
sed -i "/Anything that didn't match above/i \\\n" $WS_CONF sed -i "/Anything that didn't match above/i \\\n" $WS_CONF
systemctl reload nginx systemctl reload nginx
else else
echo "No app configuration done to server file, please report to: echo "No app configuration done to server file, please report to:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues" -> https://github.com/switnet-ltd/quick-jibri-installer/issues"
fi fi
#Static avatar #Static avatar
if [ "$ENABLE_SA" = "yes" ] && [ -f $WS_CONF ]; then if [ "$ENABLE_SA" = "yes" ] && [ -f $WS_CONF ]; then
#wget https://switnet.net/static/avatar.png -O /usr/share/jitsi-meet/images/avatar2.png #wget https://switnet.net/static/avatar.png -O /usr/share/jitsi-meet/images/avatar2.png
cp images/avatar2.png /usr/share/jitsi-meet/images/ cp images/avatar2.png /usr/share/jitsi-meet/images/
sed -i "/location \/external_api.min.js/i \ \ \ \ location \~ \^\/avatar\/\(.\*\)\\\.png {" $WS_CONF sed -i "/location \/external_api.min.js/i \ \ \ \ location \~ \^\/avatar\/\(.\*\)\\\.png {" $WS_CONF
sed -i "/location \/external_api.min.js/i \ \ \ \ \ \ \ \ alias /usr/share/jitsi-meet/images/avatar2.png;" $WS_CONF sed -i "/location \/external_api.min.js/i \ \ \ \ \ \ \ \ alias /usr/share/jitsi-meet/images/avatar2.png;" $WS_CONF
sed -i "/location \/external_api.min.js/i \ \ \ \ }\\ sed -i "/location \/external_api.min.js/i \ \ \ \ }\\
\ " $WS_CONF \ " $WS_CONF
sed -i "/RANDOM_AVATAR_URL_PREFIX/ s|false|\'https://$DOMAIN/avatar/\'|" $INT_CONF sed -i "/RANDOM_AVATAR_URL_PREFIX/ s|false|\'https://$DOMAIN/avatar/\'|" $INT_CONF
sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" $INT_CONF sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" $INT_CONF
fi fi
#nginx -tlsv1/1.1 #nginx -tlsv1/1.1
if [ "$DROP_TLS1" = "yes" ] && [ "$DIST" != "xenial" ];then if [ "$DROP_TLS1" = "yes" ] && [ "$DIST" != "xenial" ];then
echo -e "\nDropping TLSv1/1.1 in favor of v1.3" echo -e "\nDropping TLSv1/1.1 in favor of v1.3"
sed -i "s|TLSv1 TLSv1.1|TLSv1.3|" /etc/nginx/nginx.conf sed -i "s|TLSv1 TLSv1.1|TLSv1.3|" /etc/nginx/nginx.conf
#sed -i "s|TLSv1 TLSv1.1|TLSv1.3|" $WS_CONF #sed -i "s|TLSv1 TLSv1.1|TLSv1.3|" $WS_CONF
elif [ "$DROP_TLS1" = "yes" ] && [ "$DIST" = "xenial" ];then elif [ "$DROP_TLS1" = "yes" ] && [ "$DIST" = "xenial" ];then
echo -e "\nOnly dropping TLSv1/1.1" echo -e "\nOnly dropping TLSv1/1.1"
sed -i "s|TLSv1 TLSv1.1||" /etc/nginx/nginx.conf sed -i "s|TLSv1 TLSv1.1||" /etc/nginx/nginx.conf
sed -i "s| TLSv1.3||" $WS_CONF sed -i "s| TLSv1.3||" $WS_CONF
elif [ "$DROP_TLS1" = "no" ];then elif [ "$DROP_TLS1" = "no" ];then
echo "No TLSv1/1.1 dropping was done." echo "No TLSv1/1.1 dropping was done."
else else
echo "No condition meet, please report to echo "No condition meet, please report to
https://github.com/switnet-ltd/quick-jibri-installer/issues " https://github.com/switnet-ltd/quick-jibri-installer/issues "
fi fi
@ -1007,28 +1009,28 @@ sed -i "s|'videobackgroundblur', ||" $INT_CONF
###Setup secure rooms ###Setup secure rooms
if [ "$ENABLE_SC" = "yes" ]; then if [ "$ENABLE_SC" = "yes" ]; then
SRP_STR=$(grep -n "VirtualHost \"$DOMAIN\"" $PROSODY_FILE | head -n1 | cut -d ":" -f1) SRP_STR=$(grep -n "VirtualHost \"$DOMAIN\"" $PROSODY_FILE | head -n1 | cut -d ":" -f1)
SRP_END=$((SRP_STR + 10)) SRP_END=$((SRP_STR + 10))
sed -i "$SRP_STR,$SRP_END{s|authentication = \"anonymous\"|authentication = \"internal_plain\"|}" $PROSODY_FILE sed -i "$SRP_STR,$SRP_END{s|authentication = \"anonymous\"|authentication = \"internal_plain\"|}" $PROSODY_FILE
sed -i "s|// anonymousdomain: 'guest.example.com'|anonymousdomain: \'guest.$DOMAIN\'|" $MEET_CONF sed -i "s|// anonymousdomain: 'guest.example.com'|anonymousdomain: \'guest.$DOMAIN\'|" $MEET_CONF
#Secure room initial user #Secure room initial user
read -p "Set username for secure room moderator: "$'\n' -r SEC_ROOM_USER read -p "Set username for secure room moderator: "$'\n' -r SEC_ROOM_USER
read -p "Secure room moderator password: "$'\n' -r SEC_ROOM_PASS read -p "Secure room moderator password: "$'\n' -r SEC_ROOM_PASS
prosodyctl register $SEC_ROOM_USER $DOMAIN $SEC_ROOM_PASS prosodyctl register $SEC_ROOM_USER $DOMAIN $SEC_ROOM_PASS
echo -e "\nSecure rooms are being enabled..." echo -e "\nSecure rooms are being enabled..."
echo "You'll be able to login Secure Room chat with '${SEC_ROOM_USER}' \ echo "You'll be able to login Secure Room chat with '${SEC_ROOM_USER}' \
or '${SEC_ROOM_USER}@${DOMAIN}' using the password you just entered. or '${SEC_ROOM_USER}@${DOMAIN}' using the password you just entered.
If you have issues with the password refer to your sysadmin." If you have issues with the password refer to your sysadmin."
sed -i "s|#org.jitsi.jicofo.auth.URL=XMPP:|org.jitsi.jicofo.auth.URL=XMPP:|" $JICOFO_SIP sed -i "s|#org.jitsi.jicofo.auth.URL=XMPP:|org.jitsi.jicofo.auth.URL=XMPP:|" $JICOFO_SIP
sed -i "s|SEC_ROOM=.*|SEC_ROOM=\"on\"|" jm-bm.sh sed -i "s|SEC_ROOM=.*|SEC_ROOM=\"on\"|" jm-bm.sh
fi fi
###JWT ###JWT
if [ "$ENABLE_JWT" = "yes" ]; then if [ "$ENABLE_JWT" = "yes" ]; then
echo -e "\nJWT auth is being setup..." echo -e "\nJWT auth is being setup..."
bash $PWD/mode/jwt.sh bash $PWD/mode/jwt.sh
fi fi
#Guest allow #Guest allow
@ -1064,9 +1066,9 @@ sed -i "s|// startAudioMuted: 10,|startAudioMuted: 1,|" $MEET_CONF
#Disable/enable welcome page #Disable/enable welcome page
if [ "$ENABLE_WELCP" = "yes" ]; then if [ "$ENABLE_WELCP" = "yes" ]; then
sed -i "s|.*enableWelcomePage:.*| enableWelcomePage: false,|" $MEET_CONF sed -i "s|.*enableWelcomePage:.*| enableWelcomePage: false,|" $MEET_CONF
elif [ "$ENABLE_WELCP" = "no" ]; then elif [ "$ENABLE_WELCP" = "no" ]; then
sed -i "s|.*enableWelcomePage:.*| enableWelcomePage: true,|" $MEET_CONF sed -i "s|.*enableWelcomePage:.*| enableWelcomePage: true,|" $MEET_CONF
fi fi
#Set displayname as not required since jibri can't set it up. #Set displayname as not required since jibri can't set it up.
sed -i "s|// requireDisplayName: true,|requireDisplayName: false,|" $MEET_CONF sed -i "s|// requireDisplayName: true,|requireDisplayName: false,|" $MEET_CONF
@ -1099,9 +1101,9 @@ sed -i "/Enable \/ disable simulcast support/i \/\/ End QJI" $MEET_CONF
echo -e "\n# Checking $MEET_CONF file for errors\n" echo -e "\n# Checking $MEET_CONF file for errors\n"
CHECKJS=$(esvalidate $MEET_CONF| cut -d ":" -f2) CHECKJS=$(esvalidate $MEET_CONF| cut -d ":" -f2)
if [[ -z "$CHECKJS" ]]; then if [[ -z "$CHECKJS" ]]; then
echo -e "\n# The $MEET_CONF configuration seems correct. =)\n" echo -e "\n# The $MEET_CONF configuration seems correct. =)\n"
else else
echo " echo "
Watch out!, there seems to be an issue on $MEET_CONF line: Watch out!, there seems to be an issue on $MEET_CONF line:
$CHECKJS $CHECKJS
Most of the times this is due upstream changes, please report to Most of the times this is due upstream changes, please report to
@ -1126,13 +1128,13 @@ fi
enable_letsencrypt enable_letsencrypt
if [ "$ENABLE_SC" = "yes" ];then if [ "$ENABLE_SC" = "yes" ];then
echo "Waiting prosody restart to continue configuration, 15s..." echo "Waiting prosody restart to continue configuration, 15s..."
wait_seconds 15 wait_seconds 15
#Move mucs when using secure rooms - https://community.jitsi.org/t/27752/112 #Move mucs when using secure rooms - https://community.jitsi.org/t/27752/112
#Change back - https://community.jitsi.org/t/64769/136 #Change back - https://community.jitsi.org/t/64769/136
#sed -i "s| lobby_muc = \"lobby.|-- lobby_muc = \"lobby.|" $PROSODY_FILE #sed -i "s| lobby_muc = \"lobby.|-- lobby_muc = \"lobby.|" $PROSODY_FILE
#sed -i "s| main_muc = \"conference.|-- main_muc = \"conference.|" $PROSODY_FILE #sed -i "s| main_muc = \"conference.|-- main_muc = \"conference.|" $PROSODY_FILE
sed -i "s| muc_lobby_whitelist = { \"recorder.*| muc_lobby_whitelist = { \"recorder.$DOMAIN\", \"auth.$DOMAIN\" }|" $PROSODY_FILE sed -i "s| muc_lobby_whitelist = { \"recorder.*| muc_lobby_whitelist = { \"recorder.$DOMAIN\", \"auth.$DOMAIN\" }|" $PROSODY_FILE
#EO_TF #EO_TF
fi fi
@ -1142,16 +1144,16 @@ chmod -R 650 /etc/prosody/certs/
#SSL workaround #SSL workaround
if [ "$(dpkg-query -W -f='${Status}' nginx 2>/dev/null | grep -c "ok installed")" -eq 1 ]; then if [ "$(dpkg-query -W -f='${Status}' nginx 2>/dev/null | grep -c "ok installed")" -eq 1 ]; then
ssl_wa nginx nginx $DOMAIN $WS_CONF $SYSADMIN_EMAIL $DOMAIN ssl_wa nginx nginx $DOMAIN $WS_CONF $SYSADMIN_EMAIL $DOMAIN
install_ifnot python3-certbot-nginx install_ifnot python3-certbot-nginx
else else
echo "No webserver found please report." echo "No webserver found please report."
fi fi
#Brandless Mode #Brandless Mode
if [ "$ENABLE_BLESSM" = "yes" ]; then if [ "$ENABLE_BLESSM" = "yes" ]; then
echo "Custom brandless mode will be enabled." echo "Custom brandless mode will be enabled."
sed -i "s|ENABLE_BLESSM=.*|ENABLE_BLESSM=\"on\"|" jitsi-updater.sh sed -i "s|ENABLE_BLESSM=.*|ENABLE_BLESSM=\"on\"|" jitsi-updater.sh
bash $PWD/jm-bm.sh bash $PWD/jm-bm.sh
fi fi
# Applying best practives for interface config.js # Applying best practives for interface config.js
echo -e "\n> Setting up custom interface_config.js according to best practices." echo -e "\n> Setting up custom interface_config.js according to best practices."
@ -1159,58 +1161,58 @@ cp "$INT_CONF" "$INT_CONF_ETC"
#Tune webserver for interface_config.js #Tune webserver for interface_config.js
if [ -f $WS_CONF ]; then if [ -f $WS_CONF ]; then
sed -i "/external_api.js/i \\\n" $WS_CONF sed -i "/external_api.js/i \\\n" $WS_CONF
sed -i "/external_api.js/i \ \ \ \ location = \/interface_config.js {" $WS_CONF sed -i "/external_api.js/i \ \ \ \ location = \/interface_config.js {" $WS_CONF
sed -i "/external_api.js/i \ \ \ \ \ \ \ \ alias \/etc\/jitsi\/meet\/$DOMAIN-interface_config.js;" $WS_CONF sed -i "/external_api.js/i \ \ \ \ \ \ \ \ alias \/etc\/jitsi\/meet\/$DOMAIN-interface_config.js;" $WS_CONF
sed -i "/external_api.js/i \ \ \ \ }" $WS_CONF sed -i "/external_api.js/i \ \ \ \ }" $WS_CONF
sed -i "/external_api.js/i \\\n" $WS_CONF sed -i "/external_api.js/i \\\n" $WS_CONF
systemctl reload nginx systemctl reload nginx
else else
echo "No interface_config.js configuration done to server file, please report to: echo "No interface_config.js configuration done to server file, please report to:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues" -> https://github.com/switnet-ltd/quick-jibri-installer/issues"
fi fi
#JRA via Nextcloud #JRA via Nextcloud
if [ "$ENABLE_NC_ACCESS" = "yes" ]; then if [ "$ENABLE_NC_ACCESS" = "yes" ]; then
echo -n "\nJRA via Nextcloud will be enabled." echo -n "\nJRA via Nextcloud will be enabled."
if [ "$MODE" = "debug" ]; then if [ "$MODE" = "debug" ]; then
bash $PWD/jra_nextcloud.sh -m debug bash $PWD/jra_nextcloud.sh -m debug
else else
bash $PWD/jra_nextcloud.sh bash $PWD/jra_nextcloud.sh
fi fi
fi fi
} > >(tee -a qj-installer.log) 2> >(tee -a qj-installer.log >&2) } > >(tee -a qj-installer.log) 2> >(tee -a qj-installer.log >&2)
#Jigasi Transcript #Jigasi Transcript
if [ "$ENABLE_TRANSCRIPT" = "yes" ]; then if [ "$ENABLE_TRANSCRIPT" = "yes" ]; then
echo -e "\nJigasi Transcription will be enabled." echo -e "\nJigasi Transcription will be enabled."
# ToDo: Analyze behavior on debug # ToDo: Analyze behavior on debug
#if [ "$MODE" = "debug" ]; then #if [ "$MODE" = "debug" ]; then
# bash $PWD/jigasi.sh -m debug # bash $PWD/jigasi.sh -m debug
#else #else
bash $PWD/jigasi.sh bash $PWD/jigasi.sh
#fi #fi
fi fi
{ {
#Grafana Dashboard #Grafana Dashboard
if [ "$ENABLE_GRAFANA_DSH" = "yes" ]; then if [ "$ENABLE_GRAFANA_DSH" = "yes" ]; then
echo -e "\nGrafana Dashboard will be enabled." echo -e "\nGrafana Dashboard will be enabled."
if [ "$MODE" = "debug" ]; then if [ "$MODE" = "debug" ]; then
bash $PWD/grafana.sh -m debug bash $PWD/grafana.sh -m debug
else else
bash $PWD/grafana.sh bash $PWD/grafana.sh
fi fi
fi fi
#Docker Etherpad #Docker Etherpad
if [ "$ENABLE_DOCKERPAD" = "yes" ]; then if [ "$ENABLE_DOCKERPAD" = "yes" ]; then
echo -e "\nDocker Etherpad will be enabled." echo -e "\nDocker Etherpad will be enabled."
if [ "$MODE" = "debug" ]; then if [ "$MODE" = "debug" ]; then
bash $PWD/etherpad.sh -m debug bash $PWD/etherpad.sh -m debug
else else
bash $PWD/etherpad.sh bash $PWD/etherpad.sh
fi fi
fi fi
#Prevent Jibri conecction issue #Prevent Jibri conecction issue
if [ -z "$(grep -n $DOMAIN /etc/hosts)" ];then if [ -z "$(grep -n $DOMAIN /etc/hosts)" ];then
sed -i "/127.0.0.1/a \\ sed -i "/127.0.0.1/a \\
127.0.0.1 $DOMAIN" /etc/hosts 127.0.0.1 $DOMAIN" /etc/hosts
else else
echo "Local host already in place..." echo "Local host already in place..."

View File

@ -154,8 +154,8 @@ if [ -z $SND_AL_MODULE ]; then
please try rebooting.\nFor now wait 'til the end of the recommended kernel installation." please try rebooting.\nFor now wait 'til the end of the recommended kernel installation."
echo "# Check and Install HWE kernel if possible..." echo "# Check and Install HWE kernel if possible..."
if uname -r | grep -q aws;then if uname -r | grep -q aws;then
KNL_HWE="$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr)|head -n1|awk '{print$3}'|cut -d "." -f1-4)" KNL_HWE="$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr)|awk 'NR__1{print$3}'|cut -d "." -f1-4)"
KNL_MENU="$(awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg | grep generic | grep -v recovery | awk '{print$3,$4}'|grep $KNL_HWE)" KNL_MENU="$(awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg|awk '!/recovery/&&/generic/{print$3,$4}'|grep $KNL_HWE)"
if [ ! -z "$KNL_MENU" ];then if [ ! -z "$KNL_MENU" ];then
echo -e "\nSeems you are using an AWS kernel \xE2\x9C\x96 <== IMPORTANT! \nYou might consider modify your grub (/etc/default/grub) to use the following:" && \ echo -e "\nSeems you are using an AWS kernel \xE2\x9C\x96 <== IMPORTANT! \nYou might consider modify your grub (/etc/default/grub) to use the following:" && \
echo -e "\n > $KNL_MENU" echo -e "\n > $KNL_MENU"
@ -193,13 +193,13 @@ if [ -f ${CONF_JSON}_disabled ] && \
https://github.com/switnet-ltd/quick-jibri-installer/issues\n" https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
T6=1 T6=1
elif [ ! -f $CONF_JSON ] && \ elif [ ! -f $CONF_JSON ] && \
[ -f $JIBRI_CONF ] && \ [ -f $JIBRI_CONF ] && \
[ -f ${JIBRI_CONF}-dpkg-file ]; then [ -f ${JIBRI_CONF}-dpkg-file ]; then
echo -e "\n> This jibri seems to be running the lastest configuration already. \xE2\x9C\x94 \n\nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \ echo -e "\n> This jibri seems to be running the lastest configuration already. \xE2\x9C\x94 \n\nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \
https://github.com/switnet-ltd/quick-jibri-installer/issues\n" https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
T6=1 T6=1
elif [ -f ${CONF_JSON} ] && \ elif [ -f ${CONF_JSON} ] && \
[ -f $JIBRI_CONF ]; then [ -f $JIBRI_CONF ]; then
echo -e "\n> This jibri config seems to be candidate for upgrading. \xE2\x9C\x96 \nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \ echo -e "\n> This jibri config seems to be candidate for upgrading. \xE2\x9C\x96 \nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \
https://github.com/switnet-ltd/quick-jibri-installer/issues\n" https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
T6=0 T6=0