Fix indenting too.

This commit is contained in:
Luis Guzmán 2021-04-11 21:59:43 -05:00
parent 09ea0833ce
commit bbbe7d56cd
1 changed files with 58 additions and 64 deletions

View File

@ -26,7 +26,7 @@ ENABLE_BLESSM="TBD"
CHD_LTST="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)"
CHD_LTST_2D="$(echo $CHD_LTST|cut -d "." -f 1,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"
JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf"
if [ -f $JITSI_MEET_PROXY ];then
@ -87,15 +87,15 @@ update_google_repo() {
}
GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{printf "%.1f\n", $NF}')"
upgrade_cd() {
if [ ! -z $GOOGL_VER_2D ]; then
if [ ! -z "$GOOGL_VER_2D" ]; then
if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" && \
[ "$GOOGL_VER_2D" = "$CHD_LTST_2D" ]; then
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
unzip -o /tmp/chromedriver_linux64.zip -d /usr/local/bin/
chown root:root $CHDB
chmod 0755 $CHDB
chown root:root "$CHDB"
chmod 0755 "$CHDB"
rm -rf /tpm/chromedriver_linux64.zip
printf "Current version: ${Green} "$($CHDB -v |awk '{print $2}'|awk '{printf "%.1f\n", $NF}')" ${Color_Off}\n"
else
@ -154,7 +154,6 @@ else
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..."
@ -162,16 +161,13 @@ 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
if [ "$NC_DOMAIN" != "TBD" ]; then
@ -188,14 +184,12 @@ printf "${Purple}========== Enable $NC_DOMAIN for sync client ==========${Color_
echo "$NC_DOMAIN seems to be on place, skipping..."
fi
fi
restart_services
########################################################################
# Brandless mode #
########################################################################
if [ $ENABLE_BLESSM = on ]; then
if [ "$ENABLE_BLESSM" = "on" ]; then
bash $PWD/jm-bm.sh
fi
printf "${Blue}Script completed \o/! ${Color_Off}\n"