Fix domain variable and add new requirements tools.

This commit is contained in:
Luis Guzmán 2020-10-05 01:44:35 -05:00
parent ae0699bd12
commit ef3f3a0a61
1 changed files with 19 additions and 13 deletions

View File

@ -52,6 +52,7 @@ REC_DIR="/home/jibri/finalize_recording.sh"
CHD_VER="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)" CHD_VER="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)"
GOOGL_REPO="/etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list" GOOGL_REPO="/etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list"
GCMP_JSON="/etc/opt/chrome/policies/managed/managed_policies.json" GCMP_JSON="/etc/opt/chrome/policies/managed/managed_policies.json"
PUBLIC_IP="$(dig -4 @resolver1.opendns.com ANY myip.opendns.com +short)"
### 1_VAR_DEF ### 1_VAR_DEF
# sed limiters for add-jibri-node.sh variables # sed limiters for add-jibri-node.sh variables
@ -98,6 +99,10 @@ check_var JB_NAME "$JB_NAME"
check_var JB_AUTH_PASS "$JB_AUTH_PASS" check_var JB_AUTH_PASS "$JB_AUTH_PASS"
check_var JB_REC_PASS "$JB_REC_PASS" check_var JB_REC_PASS "$JB_REC_PASS"
#Rename hostname for each jibri node
hostnamectl set-hostname "jbnode${ADDUP}.${MAIN_SRV_DOMAIN}"
sed "1i ${PUBLIC_IP} 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
@ -137,14 +142,15 @@ apt-get update -q2
apt-get dist-upgrade -yq2 apt-get dist-upgrade -yq2
apt-get -y install \ apt-get -y install \
bmon \ bmon \
curl \ curl \
ffmpeg \ ffmpeg \
git \ git \
htop \ htop \
linux-image-generic-hwe-"$(lsb_release -r|awk '{print$2}')" \ inotify-tools \
unzip \ rsync \
wget unzip \
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")
@ -248,22 +254,22 @@ jibri {
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 = [ "$MAIN_SRV_DOMAIN" ]
// The base XMPP domain // The base XMPP domain
xmpp-domain = "$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.$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.$DOMAIN" domain = "auth.$MAIN_SRV_DOMAIN"
username = "jibri" username = "jibri"
password = "$JB_AUTH_PASS" password = "$JB_AUTH_PASS"
} }
@ -278,7 +284,7 @@ jibri {
// 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.$MAIN_SRV_DOMAIN"
username = "recorder" username = "recorder"
password = "$JB_REC_PASS" password = "$JB_REC_PASS"
} }