From 4b52de88ae4f1b35eb493ae53206ca2ca404ad4c Mon Sep 17 00:00:00 2001 From: Vlad R Date: Mon, 11 Nov 2024 09:52:23 +0000 Subject: [PATCH] Removed redundant code + reduced check interval to 5 minutes --- update_client.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/update_client.py b/update_client.py index 5075223..fe57935 100644 --- a/update_client.py +++ b/update_client.py @@ -16,9 +16,6 @@ MY_IP_URL = "http://ifconfig.me" domains = [DDNS_NC_URL, DDNS_WG_URL, DDNS_CR_URL, DDNS_GT_URL] -current_ip = requests.get(MY_IP_URL, timeout=15).text -registered_ip = socket.gethostbyname(GT_HOST) - while True: try: current_ip = requests.get(MY_IP_URL, timeout=15).text @@ -39,5 +36,5 @@ while True: else: print(f"No IP change detected (currently {current_ip}).") finally: - print("Sleeping 10 minutes...") - sleep(1200) + print("Sleeping 5 minutes...") + sleep(300)