Update porkbun-ddns.py
awa
This commit is contained in:
parent
747d6c3f5f
commit
8a612a11d5
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ def edit_record(id, ip):
|
|||
|
||||
# Update records
|
||||
for record in api(endpoint + 'dns/retrieve/' + data['domain'])['records']:
|
||||
if record['name'] == domain and record['type'] in 'AAAA':
|
||||
if record['name'] == domain and record['type'] in ['A', 'AAAA']:
|
||||
ip = ip_address(api((endpoint_ipv4 if record['type'] == 'A' else endpoint) + 'ping')['yourIp'])
|
||||
if not str(ip) == record['content']:
|
||||
print(edit_record(record['id'], ip))
|
||||
|
|
Reference in a new issue