Skip to content

Commit

Permalink
message
Browse files Browse the repository at this point in the history
  • Loading branch information
Feinburger committed May 3, 2024
1 parent f4522ed commit d379539
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cloudflare_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def delete_record(record_id, zone_id):
}

response = requests.request("DELETE", url, headers=headers).json()
print(response)
return response.get("success", False)

def add_record(ip_addr, subdomain, zone_id):
Expand Down
1 change: 1 addition & 0 deletions helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def monitor(subdomain, FQDN, record_list, uptime, downtime, recorded, zone_id):
status_code_range = record_list[i].get("status_code_range", [[200, 299]])
if not within_range(status_code_range, int(response.status_code)) or not string_match(record_list[i].get("match_string", "random_string"), response.text):
raise requests.RequestException()

print(f"{record_list[i]['ip_address']}:{record_list[i].get('port', 80)}{record_list[i].get('path', '/')} UP")
uptime[i] += 1
downtime[i] = 0
Expand Down

0 comments on commit d379539

Please sign in to comment.