Fix indentation

Avoid force exit on DNS fail.
This commit is contained in:
Luis Guzmán 2021-04-10 17:13:19 -05:00
parent 01aef11ba7
commit ad8c4af3b8
2 changed files with 244 additions and 239 deletions

View File

@ -45,7 +45,7 @@ if [ -z $CHDB ]; then
echo "Seems no chromedriver installed" echo "Seems no chromedriver installed"
else else
CHD_VER_LOCAL="$($CHDB -v | awk '{print $2}')" CHD_VER_LOCAL="$($CHDB -v | awk '{print $2}')"
CHD_VER_2D="$(echo $CHD_VER_LOCAL|cut -d "." -f 1,2)" CHD_VER_2D="$(echo $CHD_VER_LOCAL|awk '{printf "%.1f\n", $NF}')"
fi fi
# True if $1 is greater than $2 # True if $1 is greater than $2
@ -85,7 +85,7 @@ update_google_repo() {
echo "No Google repository found" echo "No Google repository found"
fi fi
} }
GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{print$3}'|cut -d "." -f 1,2)" GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{printf "%.1f\n", $NF}')"
upgrade_cd() { upgrade_cd() {
if [ ! -z $GOOGL_VER_2D ]; then if [ ! -z $GOOGL_VER_2D ]; then
if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" && \ if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" && \
@ -97,7 +97,7 @@ if [ ! -z $GOOGL_VER_2D ]; then
chown root:root $CHDB chown root:root $CHDB
chmod 0755 $CHDB chmod 0755 $CHDB
rm -rf /tpm/chromedriver_linux64.zip rm -rf /tpm/chromedriver_linux64.zip
printf "Current version: ${Green} "$($CHDB -v | awk '{print $2}'|cut -d "." -f 1,2)" ${Color_Off}\n" printf "Current version: ${Green} "$($CHDB -v |awk '{print $2}'|awk '{printf "%.1f\n", $NF}')" ${Color_Off}\n"
else else
echo "No need to upgrade Chromedriver" echo "No need to upgrade Chromedriver"
printf "Current version: ${Green} $CHD_VER_2D ${Color_Off}\n" printf "Current version: ${Green} $CHD_VER_2D ${Color_Off}\n"

View File

@ -279,10 +279,15 @@ if [ "$LE_SSL" = "yes" ]; then
" "
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. Exiting for now... 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
if [ "$DNS_CONTINUE" = "yes" ]; then
echo " - We'll continue anyway..."
else
echo " - Exiting for now..."
exit exit
fi fi
fi
fi fi
# Requirements # Requirements
echo -e "\nWe'll start by installing system requirements this may take a while please be patient...\n" echo -e "\nWe'll start by installing system requirements this may take a while please be patient...\n"
@ -1210,7 +1215,7 @@ if [ "$ENABLE_DOCKERPAD" = "yes" ]; then
fi fi
#Prevent Jibri conecction issue #Prevent Jibri conecction issue
if [ -z "$(grep -n $DOMAIN /etc/hosts)" ];then if [ -z "$(grep -n $DOMAIN /etc/hosts)" ];then
sed -i "/127.0.0.1/a \\ sed -i "/127.0.0.1/a \\
127.0.0.1 $DOMAIN" /etc/hosts 127.0.0.1 $DOMAIN" /etc/hosts
else else
echo "Local host already in place..." echo "Local host already in place..."