This commit is contained in:
@@ -30,15 +30,19 @@ def update_zone(subdomain,new_ip,domain_id):
|
||||
result = client.put('/domain/zone/'+new_domain+'/dynHost/record/'+domain_id,
|
||||
ip=new_ip,
|
||||
subDomain=subdomain)
|
||||
print("Zone updated")
|
||||
refresh_dns()
|
||||
|
||||
return result
|
||||
|
||||
def refresh_dns():
|
||||
result_refresh = client.post('/domain/zone/'+new_domain+'/refresh')
|
||||
print("DNS refreshed")
|
||||
return result_refresh
|
||||
|
||||
def MyIP():
|
||||
response = requests.get('https://ifconfig.me/ip')
|
||||
print("Current IP: "+response.text)
|
||||
return response.text
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user