mirror of
https://github.com/Hyperspeed1313/porkbun-dynamic-dns-python.git
synced 2026-01-31 04:41:21 +00:00
Add Mail Exchange Entries to supported entry types. Ignore config.json file.
This commit is contained in:
parent
fb2257ac35
commit
79941fe432
2 changed files with 2 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
mydata
|
||||
config.json
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ def getMyIP():
|
|||
|
||||
def replaceInvalidRecords():
|
||||
for i in getRecords(rootDomain)["records"]:
|
||||
if i["name"]==fqdn and (i["type"] == 'A' or i["type"] == 'ALIAS' or i["type"] == 'CNAME'):
|
||||
if i["name"]==fqdn and (i["type"] == 'A' or i["type"] == 'ALIAS' or i["type"] == 'CNAME') or i["type"] == "MX":
|
||||
if myIP != i["content"]:
|
||||
printIfAllowed("Deleting existing " + i["type"] + " Record")
|
||||
printIfAllowed( "DELETE: " + (json.loads(requests.post(apiConfig["endpoint"] + '/dns/delete/' + rootDomain + '/' + i["id"], data = json.dumps(apiConfig)).text)["status"]) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue