5.4.3 #35
|
@ -174,10 +174,10 @@ 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
|
||||||
|
@ -251,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)
|
||||||
|
|
|
@ -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 '
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
50
etherpad.sh
50
etherpad.sh
|
@ -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
|
||||||
|
|
111
jra_nextcloud.sh
111
jra_nextcloud.sh
|
@ -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 "
|
||||||
|
|
|
@ -266,19 +266,18 @@ 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, otherwise components may fail."
|
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
|
read -p " > Do you want to continue?: (yes or no)"$'\n' -r DNS_CONTINUE
|
||||||
if [ "$DNS_CONTINUE" = "yes" ]; then
|
if [ "$DNS_CONTINUE" = "yes" ]; then
|
||||||
|
@ -295,18 +294,18 @@ 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 \
|
||||||
|
@ -318,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)
|
||||||
|
@ -350,12 +349,12 @@ 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
|
||||||
|
@ -469,12 +468,12 @@ 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 ]]
|
||||||
|
@ -489,32 +488,32 @@ 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" ]]
|
||||||
|
@ -568,13 +567,13 @@ 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
|
||||||
|
@ -584,13 +583,13 @@ if [ "$(curl -s -o /dev/null -w "%{http_code}" $GC_SDK_REL_FILE )" == "404" ]; t
|
||||||
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
|
||||||
|
@ -644,7 +643,7 @@ fi
|
||||||
|
|
||||||
enable_letsencrypt() {
|
enable_letsencrypt() {
|
||||||
if [ "$LE_SSL" = "yes" ]; then
|
if [ "$LE_SSL" = "yes" ]; then
|
||||||
echo '
|
echo '
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
# Starting LetsEncrypt configuration
|
# Starting LetsEncrypt configuration
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
|
@ -652,23 +651,22 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -766,16 +764,15 @@ 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
|
||||||
|
@ -789,7 +786,7 @@ 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
|
||||||
|
|
||||||
|
@ -1001,7 +998,7 @@ elif [ "$DROP_TLS1" = "yes" ] && [ "$DIST" = "xenial" ];then
|
||||||
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
|
||||||
|
|
||||||
|
@ -1012,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
|
||||||
|
@ -1104,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
|
||||||
|
@ -1131,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
|
||||||
|
|
||||||
|
@ -1191,7 +1188,7 @@ if [ "$ENABLE_TRANSCRIPT" = "yes" ]; then
|
||||||
#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
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue