#!/bin/sh # Activating Debug mode echo "Press CTRL+C to proceed." trap "pkill -f 'sleep 1h'" INT trap "set +x ; sleep 1h ; set -x" DEBUG clear echo " ***********************************************" echo " * *" echo " * WELCOME TO THE CLUSTERMEET CONFIGURATOR *" echo " * powered by clusteres.com *" echo " * *" echo " ***********************************************" echo " " echo " " echo " " echo "Before executing this script, make sure to meet the following requisites:" echo " 1. Jitsi Meet is not already configured." echo " 2. Replace favicon.ico, watermark.png, background.png for company ones in images/folder" echo "" echo "" echo "" echo "Execute this script every time you run apt-get upgrade" echo "" read -r -p "Do you want to continue customizing this Jitsi Meet server? Choose \"No\" to Cancel and Exit [y/N]: " response case $response in [yY][eE][sS]|[yY]) echo "Starting Jitsi Meet customization..." ;; *) exit 1 ;; esac # CUSTOMIZING JITSI # Copy logos and background cp ~/ClusterMeetConfigurator/images/favicon.ico /usr/share/jitsi-meet/images/favicon.ico cp ~/ClusterMeetConfigurator/images/watermark.png /usr/share/jitsi-meet/images/watermark.png cp ~/ClusterMeetConfigurator/images/background.png /usr/share/jitsi-meet/images/background.png cp ~/ClusterMeetConfigurator/images/watermark.png /usr/share/jitsi-meet/images/jitsilogo.png # Modifying English text sed -i "s/Secure, fully featured, and completely free video conferencing/Welcome to $COMPANYNAME video conferencing server/g" /usr/share/jitsi-meet/libs/app.bundle.min.js sed -i 's/Go ahead, video chat with the whole team. In fact, invite everyone you know. {{app}} is a fully encrypted, 100% open source video conferencing solution that you can use all day, every day, for free — with no account needed./Please type the name of the room and click the GO button to start the meeting. All communications are fully encrypted./g' /usr/share/jitsi-meet/libs/app.bundle.min.js sed -i 's/Start a new meeting/Meeting room name:/g' /usr/share/jitsi-meet/libs/app.bundle.min.js # Modifying Spanish ES text sed -i "s/Videoconferencias seguras, con gran variedad de funcionalidades y completamente gratuitas/Bienvenidos al servidor de video conferencias de $COMPANYNAME/g" /usr/share/jitsi-meet/lang/main-es.json sed -i 's/Adelante, video chat con todo el equipo. De hecho, invita a todos los que conozcas. {{app}} es una solución de videoconferencia de código abierto de 100%, totalmente encriptada, que puede usar todo el día, todos los días, de forma gratuita, sin necesidad de contar con ninguna cuenta./Por favor introduce el nombre de la sala y presiona IR para empezar la reunión. Todas las comunicaciones son completamente cifradas./g' /usr/share/jitsi-meet/lang/main-es.json sed -i 's/Comenzar una reunión/Nombre de la sala:/g' /usr/share/jitsi-meet/lang/main-es.json # Modifying Spanish LA text sed -i "s/Conferencias en video seguras, con gran variedad de funciones y completamente gratuitas/Bienvenidos al servidor de video conferencias de $COMPANYNAME/g" /usr/share/jitsi-meet/lang/main-esUS.json sed -i 's/Adelante, ten una sesión de chat de video con todo el equipo. De hecho, invita a todas las personas que conozcas. {{app}} es una solución de conferencias en video en código abierto al 100% y completamente cifrada que puedes usar todo el día, todos los días y sin cargo, sin necesidad de tener una cuenta./Por favor introduce el nombre de la sala y presiona IR para empezar la reunión. Todas las comunicaciones son completamente cifradas./g' /usr/share/jitsi-meet/lang/main-esUS.json sed -i 's/Iniciar una nueva reunión/Nombre de la sala:/g' /usr/share/jitsi-meet/lang/main-esUS.json # Changing web name and URL sed -i "s/jitsi.org/$COMPANYDOMAIN/g" /usr/share/jitsi-meet/interface_config.js sed -i "s/Jitsi Meet/$COMPANYNAME Conferences/g" /usr/share/jitsi-meet/interface_config.js # Changing background of the front page sed -i 's!background-image:linear-gradient(-90deg,#1251AE 0,#0074FF 50%,#1251AE 100%);!background-image:url(../images/background.png);background-position:center;background-repeat:none;background-size:cover;!g' /usr/share/jitsi-meet/css/all.css # Asking the user to identify by name before entering the meeting room sed -i 's!// requireDisplayName: true,!requireDisplayName: true,!g' "/etc/jitsi/meet/$COMPANYSUBDOMAIN.$COMPANYDOMAIN-config.js" #Disable Audio LevelS sed -i 's!// disableAudioLevels: false,!disableAudioLevels: true,!g' "/etc/jitsi/meet/$COMPANYSUBDOMAIN.$COMPANYDOMAIN-config.js" # Modifying html titles sed -i "s/Jitsi Meet/$COMPANYNAME/g" /usr/share/jitsi-meet/title.html sed -i "s/Join a WebRTC video conference powered by the Jitsi Videobridge/Únete a la conferencia en línea de $COMPANYNAME" /usr/share/jitsi-meet/title.html echo "" echo "" read -r -p "Do you want to apply the \"Secure Domain\" configuration? Choose \"No\" to continue and finish the installation [y/N]: " response case $response in [yY][eE][sS]|[yY]) echo "Starting Secure Domain configuration..." # Secure Domain config sed -i "s!authentication = "anonymous"!authentication = "internal_hashed"!g" "/etc/prosody/conf.avail/$COMPANYSUBDOMAIN.$COMPANYDOMAIN.cfg.lua" grep -Pzo "VirtualHost \"guest.$COMPANYSUBDOMAIN.$COMPANYDOMAIN\"\n authentication = \"anonymous\"\n c2s_require_encryption = false" "/etc/prosody/conf.avail/$COMPANYSUBDOMAIN.$COMPANYDOMAIN.cfg.lua" || echo -e "\nVirtualHost \"guest.$COMPANYSUBDOMAIN.$COMPANYDOMAIN\"\n authentication = \"anonymous\"\n c2s_require_encryption = false" >> "/etc/prosody/conf.avail/$COMPANYSUBDOMAIN.$COMPANYDOMAIN.cfg.lua" sed -i "s?// anonymousdomain: 'guest.example.com',?anonymousdomain: 'guest.$COMPANYSUBDOMAIN.$COMPANYDOMAIN',?g" "/etc/jitsi/meet/$COMPANYSUBDOMAIN.$COMPANYDOMAIN-config.js" grep -Pzo "org.jitsi.jicofo.auth.URL=XMPP:$COMPANYSUBDOMAIN.$COMPANYDOMAIN" /etc/jitsi/jicofo/sip-communicator.properties || echo -e "org.jitsi.jicofo.auth.URL=XMPP:$COMPANYSUBDOMAIN.$COMPANYDOMAIN" >> /etc/jitsi/jicofo/sip-communicator.properties echo "" echo "" # Registering users ANSWER="yes" while [ "$ANSWER" == "yes" ] do read -r -p "Input the username: " USERNAME echo "" echo "Input password for $USERNAME: " prosodyctl register $USERNAME $COMPANYSUBDOMAIN.$COMPANYDOMAIN echo "done" echo "" echo "" read -r -p "Do you want to add another user? [y/N] " response2 case $response2 in [yY][eE][sS]|[yY]) ANSWER="yes" ;; *) ANSWER="no" ;; esac done ;; *) echo "Continuing..." ;; esac # Restart services /etc/init.d/jicofo restart && /etc/init.d/jitsi-videobridge2 restart && /etc/init.d/nginx restart && /etc/init.d/prosody restart