Buf-Fix: Force the zonefile to have after download a linebreak at the end, to ensure proper processing

Signed-off-by: Blackyfff <blackyfff@noreply.git.freifunk-franken.de>
This commit is contained in:
Blackyfff 2021-06-27 23:17:53 +02:00
parent 59eb00bc49
commit 9d02689d62
1 changed files with 1 additions and 1 deletions

View File

@ -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