Change approach to customize interface_config.js
Also tune jitsi-updater and brandless mode
This commit is contained in:
parent
174d41e123
commit
a7cd183bb3
|
@ -32,6 +32,7 @@ if [ -f $JITSI_MEET_PROXY ];then
|
|||
PREAD_PROXY=$(grep -nr "preread_server_name" $JITSI_MEET_PROXY | cut -d ":" -f1)
|
||||
fi
|
||||
INT_CONF="/usr/share/jitsi-meet/interface_config.js"
|
||||
INT_CONF_ETC="/etc/jitsi/meet/$DOMAIN-interface_config.js"
|
||||
jibri_packages="$(grep Package /var/lib/apt/lists/download.jitsi.org_*_Packages |sort -u|awk '{print $2}'|sed 's|jigasi||'|paste -s -d ' ')"
|
||||
AVATAR="$(grep -r avatar /etc/nginx/sites-*/ 2>/dev/null)"
|
||||
if [ -f $apt_repo/google-chrome.list ]; then
|
||||
|
@ -131,33 +132,39 @@ fi
|
|||
########################################################################
|
||||
# User interface changes #
|
||||
########################################################################
|
||||
printf "${Purple}========== Setting Static Avatar ==========${Color_Off}\n"
|
||||
if [[ -z "$AVATAR" ]]; then
|
||||
echo "Moving on..."
|
||||
|
||||
if [ -f "$INT_CONF_ETC" ]; then
|
||||
echo "Static interface_config.js exists, skipping modification..."
|
||||
else
|
||||
echo "Setting Static Avatar"
|
||||
sed -i "/RANDOM_AVATAR_URL_PREFIX/ s|false|\'http://$DOMAIN/avatar/\'|" $INT_CONF
|
||||
sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" $INT_CONF
|
||||
echo "This setup doesn't have a static interface_config.js, checking changes..."
|
||||
printf "${Purple}========== Setting Static Avatar ==========${Color_Off}\n"
|
||||
if [[ -z "$AVATAR" ]]; then
|
||||
echo "Moving on..."
|
||||
else
|
||||
echo "Setting Static Avatar"
|
||||
sed -i "/RANDOM_AVATAR_URL_PREFIX/ s|false|\'http://$DOMAIN/avatar/\'|" $INT_CONF
|
||||
sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" $INT_CONF
|
||||
fi
|
||||
|
||||
printf "${Purple}========== Setting Support Link ==========${Color_Off}\n"
|
||||
if [[ -z $support ]]; then
|
||||
echo "Moving on..."
|
||||
else
|
||||
echo "Setting Support custom link"
|
||||
sed -i "s|https://jitsi.org/live|$support|g" $INT_CONF
|
||||
fi
|
||||
|
||||
printf "${Purple}========== Disable Localrecording ==========${Color_Off}\n"
|
||||
if [ "$LOC_REC" != "on" ]; then
|
||||
echo "Removing localrecording..."
|
||||
sed -i "s|'localrecording',||" $INT_CONF
|
||||
fi
|
||||
|
||||
printf "${Purple}========== Disable Blur my background ==========${Color_Off}\n"
|
||||
sed -i "s|'videobackgroundblur', ||" $INT_CONF
|
||||
|
||||
fi
|
||||
|
||||
printf "${Purple}========== Setting Support Link ==========${Color_Off}\n"
|
||||
if [[ -z $support ]]; then
|
||||
echo "Moving on..."
|
||||
else
|
||||
echo "Setting Support custom link"
|
||||
sed -i "s|https://jitsi.org/live|$support|g" $INT_CONF
|
||||
fi
|
||||
|
||||
printf "${Purple}========== Disable Localrecording ==========${Color_Off}\n"
|
||||
if [ "$LOC_REC" != "on" ]; then
|
||||
echo "Removing localrecording..."
|
||||
sed -i "s|'localrecording',||" $INT_CONF
|
||||
fi
|
||||
|
||||
printf "${Purple}========== Disable Blur my background ==========${Color_Off}\n"
|
||||
sed -i "s|'videobackgroundblur', ||" $INT_CONF
|
||||
|
||||
|
||||
if [ "$NC_DOMAIN" != "TBD" ]; then
|
||||
printf "${Purple}========== Enable $NC_DOMAIN for sync client ==========${Color_Off}\n"
|
||||
if [ -z "$PREAD_PROXY" ]; then
|
||||
|
|
22
jm-bm.sh
22
jm-bm.sh
|
@ -7,6 +7,7 @@
|
|||
CSS_FILE="/usr/share/jitsi-meet/css/all.css"
|
||||
TITLE_FILE="/usr/share/jitsi-meet/title.html"
|
||||
INT_CONF="/usr/share/jitsi-meet/interface_config.js"
|
||||
INT_CONF_ETC="/etc/jitsi/meet/$DOMAIN-interface_config.js"
|
||||
BUNDLE_JS="/usr/share/jitsi-meet/libs/app.bundle.min.js"
|
||||
#
|
||||
JM_IMG_PATH="/usr/share/jitsi-meet/images"
|
||||
|
@ -56,17 +57,20 @@ sed -i "s|.leftwatermark{|.leftwatermark{display:none;|" $CSS_FILE
|
|||
fi
|
||||
|
||||
#Customize room title
|
||||
sed -i "s|\([[:space:]]\)APP_NAME:.*| APP_NAME: \'$APP_NAME\',|" $INT_CONF
|
||||
sed -i "s|Jitsi Meet|$APP_NAME|g" $TITLE_FILE
|
||||
sed -i "s| powered by the Jitsi Videobridge||g" $TITLE_FILE
|
||||
sed -i "21,32 s|Jitsi Meet|$APP_NAME|g" $INT_CONF
|
||||
sed -i "/appNotInstalled/ s|{{app}}|$MOVILE_APP_NAME|" /usr/share/jitsi-meet/lang/*
|
||||
|
||||
#Custom UI changes
|
||||
echo "
|
||||
Please note that brandless mode will also overwrite support links.
|
||||
"
|
||||
sed -i "s|Fellow Jitster|$PART_USER|g" $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|SUPPORT_URL: .*|SUPPORT_URL: '#',|g" $INT_CONF
|
||||
if [ -f "$INT_CONF_ETC" ]; then
|
||||
echo "Static interface_config.js exists, skipping modification..."
|
||||
else
|
||||
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"
|
||||
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|Fellow Jitster|$PART_USER|g" $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|SUPPORT_URL: .*|SUPPORT_URL: '#',|g" $INT_CONF
|
||||
fi
|
||||
|
|
|
@ -515,6 +515,7 @@ echo '
|
|||
'
|
||||
JibriBrewery=JibriBrewery
|
||||
INT_CONF="/usr/share/jitsi-meet/interface_config.js"
|
||||
INT_CONF_ETC="/etc/jitsi/meet/$DOMAIN-interface_config.js"
|
||||
WAN_IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
|
||||
|
||||
ssl_wa() {
|
||||
|
@ -818,8 +819,26 @@ else
|
|||
https://github.com/switnet-ltd/quick-jibri-installer/issues "
|
||||
fi
|
||||
|
||||
# Disable "Blur my background" until new notice
|
||||
echo "Disable \"Blur my background\" until new notice"
|
||||
sed -i "s|'videobackgroundblur', ||" $INT_CONF
|
||||
|
||||
# Applying best practives for interface config.js
|
||||
echo "> Setting up custom interface_config.js acording to best practices."
|
||||
cp "$INT_CONF" "$INT_CONF_ETC"
|
||||
|
||||
#Tune webserver for interface_config.js
|
||||
if [ -f $WS_CONF ]; then
|
||||
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 \ \ \ \ \ \ \ \ alias \/etc\/jitsi\/meet\/$DOMAIN-interface_config.js;" $WS_CONF
|
||||
sed -i "/external_api.js/i \ \ \ \ }" $WS_CONF
|
||||
sed -i "/external_api.js/i \\\n" $WS_CONF
|
||||
systemctl reload nginx
|
||||
else
|
||||
echo "No interface_config.js configuration done to server file, please report to:
|
||||
-> https://github.com/switnet-ltd/quick-jibri-installer/issues"
|
||||
fi
|
||||
|
||||
#================== Setup prosody conf file =================
|
||||
|
||||
#Setup secure rooms
|
||||
|
|
Loading…
Reference in New Issue