From 9d02689d626b436d343d9c279d3f34529a3cf61f Mon Sep 17 00:00:00 2001 From: Blackyfff Date: Sun, 27 Jun 2021 23:17:53 +0200 Subject: [PATCH] Buf-Fix: Force the zonefile to have after download a linebreak at the end, to ensure proper processing Signed-off-by: Blackyfff --- update-dns.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-dns.sh b/update-dns.sh index 3379dd2..6b71140 100644 --- a/update-dns.sh +++ b/update-dns.sh @@ -58,7 +58,7 @@ rm -f "$TempFolder""$ExternalView"".conf" CachedMasterFile="$TempFolder""cache/db.""$CommunityDomain" PreFetchMasterSerial="$(GetZoneFileSerial "$CachedMasterFile")" -$(curl -s -S -f "$RemoteLocation""db.""$CommunityDomain" --output "$CachedMasterFile") +$(curl -s -S -f "$RemoteLocation""db.""$CommunityDomain" --output "$CachedMasterFile" && [ -f $CachedMasterFile" ] && echo "" >> $CachedMasterFile") PostFetchMasterSerial="$(GetZoneFileSerial "$CachedMasterFile")" ServeMasterZone="$( GetAllZoneNameservers "$CommunityDomain" "$CachedMasterFile" | awk '{for(i=NF;i>0;--i) if($i=="'"$DNSSCRIPT_SERVER_NAME"'") {printf 1}}')" if [ -n "$CommunityExternDomain" ]; then