diff --git a/usr/lib/ffdns/update-dns-functions.sh b/usr/lib/ffdns/update-dns-functions.sh index beed12d..65a9e46 100755 --- a/usr/lib/ffdns/update-dns-functions.sh +++ b/usr/lib/ffdns/update-dns-functions.sh @@ -44,7 +44,7 @@ UpdateMasterZone() { ZoneTempFolder="$TempFolder""cache/""$MasterDomain""/" UpdateMaster="$(UpdateDNSSECEntryCache "$MasterDomain" "$ZoneTempFolder" "$CachedMasterFile" "$DNSSECKeyFolder")" - if [ $((PostFetchMasterSerial)) -gt $((PreFetchMasterSerial)) ] || [ $UpdateMaster -ne 0 ]; then + if [ $((PostFetchMasterSerial)) -gt $((PreFetchMasterSerial)) ] || [ $UpdateMaster -ne 0 ] || [ ! -f "$MasterFile" ]; then cp -f "$CachedMasterFile" "$CachedMasterFile""I" for KeyFile in "$ZoneTempFolder"*; do [ "$KeyFile" = "$ZoneTempFolder""*" ] || \ diff --git a/usr/lib/ffdns/update-dns.sh b/usr/lib/ffdns/update-dns.sh index 6209638..96d4964 100755 --- a/usr/lib/ffdns/update-dns.sh +++ b/usr/lib/ffdns/update-dns.sh @@ -49,7 +49,6 @@ if [ -n "$ServeMasterZone" ] || [ -n "$(DoServeOnlyExternZone)" ]; then if [ -n "$ServeMasterZone" ]; then MasterFile="$ZoneFilesFolder""db.""$FirstInternalView"".""$MasterDomain" - cp -f "$CachedMasterFile" "$MasterFile" FileForExternGeneration="$MasterFile" else FileForExternGeneration="$CachedMasterFile" @@ -61,13 +60,12 @@ if [ -n "$ServeMasterZone" ] || [ -n "$(DoServeOnlyExternZone)" ]; then ExternFile="$ZoneFilesFolder""db.extern.""$MasterDomain" fi - LocalMasterSerial="$(UpdateMasterZone)" + SerialIntern="$(UpdateMasterZone)" InternalZoneFile="$FileForExternGeneration" ExternalZoneFile="$ExternFile" InternalDomain="$MasterDomain" ExternDomain="$MasterExternDomain" - SerialIntern="$LocalMasterSerial" UpdateExternal fi