mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 22:50:26 +00:00
Allow to change root domain record via dyndns
This commit is contained in:
parent
4ff755bc20
commit
03e0f50795
@ -762,12 +762,12 @@ def dyndns_update():
|
|||||||
domain = None
|
domain = None
|
||||||
domain_segments = hostname.split('.')
|
domain_segments = hostname.split('.')
|
||||||
for index in range(len(domain_segments)):
|
for index in range(len(domain_segments)):
|
||||||
domain_segments.pop(0)
|
|
||||||
full_domain = '.'.join(domain_segments)
|
full_domain = '.'.join(domain_segments)
|
||||||
potential_domain = Domain.query.filter(Domain.name == full_domain).first()
|
potential_domain = Domain.query.filter(Domain.name == full_domain).first()
|
||||||
if potential_domain in domains:
|
if potential_domain in domains:
|
||||||
domain = potential_domain
|
domain = potential_domain
|
||||||
break
|
break
|
||||||
|
domain_segments.pop(0)
|
||||||
|
|
||||||
if not domain:
|
if not domain:
|
||||||
history = History(msg="DynDNS update: attempted update of %s but it does not exist for this user" % hostname, created_by=current_user.username)
|
history = History(msg="DynDNS update: attempted update of %s but it does not exist for this user" % hostname, created_by=current_user.username)
|
||||||
|
Loading…
Reference in New Issue
Block a user