mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
ledns -> roundrobin
This commit is contained in:
@@ -19,8 +19,8 @@ class Configuration:
|
||||
telegram_token = ofm_config['telegram_token']
|
||||
telegram_chat_id = ofm_config['telegram_chat_id']
|
||||
|
||||
domain_ledns = ofm_config['domain_ledns']
|
||||
domain_root = '.'.join(domain_ledns.split('.')[-2:])
|
||||
domain_roundrobin = ofm_config['domain_roundrobin']
|
||||
domain_root = '.'.join(domain_roundrobin.split('.')[-2:])
|
||||
|
||||
cloudflare_ini = dotenv_values(ofm_config_dir / 'cloudflare.ini')
|
||||
cloudflare_api_token = cloudflare_ini['dns_cloudflare_api_token']
|
||||
|
||||
@@ -72,9 +72,9 @@ def run_area(area):
|
||||
try:
|
||||
# don't check latest
|
||||
if relaxed_mode:
|
||||
check_host_version(config.domain_ledns, host_ip, area, version)
|
||||
check_host_version(config.domain_roundrobin, host_ip, area, version)
|
||||
else:
|
||||
check_host_latest(config.domain_ledns, host_ip, area, version)
|
||||
check_host_latest(config.domain_roundrobin, host_ip, area, version)
|
||||
|
||||
results[host_ip] = True
|
||||
except Exception as e:
|
||||
@@ -91,11 +91,11 @@ def update_records(working_hosts) -> bool:
|
||||
|
||||
updated |= set_records_round_robin(
|
||||
zone_id=zone_id,
|
||||
name=config.domain_ledns,
|
||||
name=config.domain_roundrobin,
|
||||
host_ip_set=working_hosts,
|
||||
proxied=False,
|
||||
ttl=300,
|
||||
comment='domain_ledns',
|
||||
comment='domain_roundrobin',
|
||||
cloudflare_api_token=config.cloudflare_api_token,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user