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,
|
result = client.put('/domain/zone/'+new_domain+'/dynHost/record/'+domain_id,
|
||||||
ip=new_ip,
|
ip=new_ip,
|
||||||
subDomain=subdomain)
|
subDomain=subdomain)
|
||||||
|
print("Zone updated")
|
||||||
refresh_dns()
|
refresh_dns()
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def refresh_dns():
|
def refresh_dns():
|
||||||
result_refresh = client.post('/domain/zone/'+new_domain+'/refresh')
|
result_refresh = client.post('/domain/zone/'+new_domain+'/refresh')
|
||||||
|
print("DNS refreshed")
|
||||||
return result_refresh
|
return result_refresh
|
||||||
|
|
||||||
def MyIP():
|
def MyIP():
|
||||||
response = requests.get('https://ifconfig.me/ip')
|
response = requests.get('https://ifconfig.me/ip')
|
||||||
|
print("Current IP: "+response.text)
|
||||||
return response.text
|
return response.text
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user