timothymiller / cloudflare-ddns

🎉🌩️ Dynamic DNS (DDNS) service based on Cloudflare! Access your home network remotely via a custom domain name without a static IP!
https://timknowsbest.com/free-dynamic-dns
GNU General Public License v3.0
3.14k stars 333 forks source link

Sync process loop time with TTL if set to auto #178

Open cotton105 opened 9 months ago

cotton105 commented 9 months ago

If launched with python cloudflare-ddns.py --repeat and the TTL is set to 1 (auto), then the process will loop every 1 second instead of 300 seconds, which is what auto actually means in Cloudflare.

This change adds a variable separate from ttl, which is used for the looping behaviour of the program. I have also reduced some repetition of code.