Added handling for root domains

This commit is contained in:
Neshura 2022-12-12 10:43:51 +01:00
parent 05b4544331
commit 331f0c092c
No known key found for this signature in database
GPG key ID: ACDF5B6EBECF6B0A

View file

@ -79,7 +79,10 @@ class DNSUpdater:
names_replace = self.dns_replacements[dnstype] names_replace = self.dns_replacements[dnstype]
print(names_replace) print(names_replace)
for name in names_replace: for name in names_replace:
fullname = f"{name}.{self.HOSTNAME}" if (name == "@"):
fullname = self.HOSTNAME
else:
fullname = f"{name}.{self.HOSTNAME}"
for record in self.DNSRECORDS[dnstype]: for record in self.DNSRECORDS[dnstype]:
if record['name'] == fullname: if record['name'] == fullname: