1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/adguardhome_ynh.git synced 2024-09-03 18:06:23 +02:00

update IPs each time the function update_config is called

This commit is contained in:
OniriCorpe 2023-12-27 07:22:52 +01:00
parent f57edf01d5
commit 09287bf217

View file

@ -56,13 +56,13 @@ with open(\"$install_dir/AdGuardHome.yaml\", 'r') as file:
need_file_update = False
if \"0.0.0.0\" in conf_file[\"dns\"][\"bind_hosts\"]:
conf_file[\"dns\"][\"bind_hosts\"] = []
if \"$ipv4_addr\":
conf_file[\"dns\"][\"bind_hosts\"].append(\"$ipv4_addr\")
if \"$ipv6_addr\":
conf_file[\"dns\"][\"bind_hosts\"].append(\"$ipv6_addr\")
need_file_update = True
conf_file[\"dns\"][\"bind_hosts\"] = []
if \"$ipv4_addr\":
conf_file[\"dns\"][\"bind_hosts\"].append(\"$ipv4_addr\")
need_file_update = True
if \"$ipv6_addr\":
conf_file[\"dns\"][\"bind_hosts\"].append(\"$ipv6_addr\")
need_file_update = True
if need_file_update:
with open(\"$install_dir/AdGuardHome.yaml\", 'w') as file: