From 3a649887c53777d682dc32fc922321ee59ec3702 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 6 May 2021 15:11:21 -0500 Subject: [PATCH] Detect IP on CNAME records --- jra_nextcloud.sh | 2 +- quick_jibri_installer.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index 0fa958f..c729fc5 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -78,7 +78,7 @@ do fi done #Simple DNS test -if [ "$PUBLIC_IP" = "$(dig -4 +short $NC_DOMAIN)" ]; then +if [ "$PUBLIC_IP" = "$(dig -4 +short $NC_DOMAIN|awk -v RS='([0-9]+\\.){3}[0-9]+' 'RT{print RT}')" ]; then echo "Server public IP & DNS record for $NC_DOMAIN seems to match, continuing... " else diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 28b27e0..2f9ee0c 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -284,7 +284,7 @@ if [ "$LE_SSL" = "yes" ]; then fi done #Simple DNS test - if [ "$PUBLIC_IP" = "$(dig -4 +short $JITSI_DOMAIN)" ]; then + if [ "$PUBLIC_IP" = "$(dig -4 +short $JITSI_DOMAIN||awk -v RS='([0-9]+\\.){3}[0-9]+' 'RT{print RT}')" ]; then echo "Server public IP & DNS record for $JITSI_DOMAIN seems to match, continuing... " else