mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 23:20:27 +00:00
Records added via DynDNS are now active. Fixes #61.
This commit is contained in:
parent
d093c1976d
commit
856b5ec84f
@ -756,7 +756,7 @@ def dyndns_update():
|
|||||||
elif r.is_allowed:
|
elif r.is_allowed:
|
||||||
ondemand_creation = DomainSetting.query.filter(DomainSetting.domain == domain).filter(DomainSetting.setting == 'create_via_dyndns').first()
|
ondemand_creation = DomainSetting.query.filter(DomainSetting.domain == domain).filter(DomainSetting.setting == 'create_via_dyndns').first()
|
||||||
if bool(int(ondemand_creation.value)) == True:
|
if bool(int(ondemand_creation.value)) == True:
|
||||||
record = Record(name=hostname,type='A',data=myip,status=True,ttl=3600)
|
record = Record(name=hostname,type='A',data=myip,status=False,ttl=3600)
|
||||||
result = record.add(domain.name)
|
result = record.add(domain.name)
|
||||||
if result['status'] == 'ok':
|
if result['status'] == 'ok':
|
||||||
history = History(msg='DynDNS update: created record %s in zone %s, it now represents %s' % (hostname,domain.name,myip), detail=str(result), created_by=current_user.username)
|
history = History(msg='DynDNS update: created record %s in zone %s, it now represents %s' % (hostname,domain.name,myip), detail=str(result), created_by=current_user.username)
|
||||||
|
Loading…
Reference in New Issue
Block a user