From 1828efa42652ad44fda51f98855d4a8b39f42dbc Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 31 Dec 2023 04:48:18 +0100 Subject: [PATCH] update the AGH config when enabling or disabling DoH --- scripts/config | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/config b/scripts/config index ee054a1..41ed02c 100644 --- a/scripts/config +++ b/scripts/config @@ -47,9 +47,8 @@ set__open_port_53() { # the 'sed' is used to get rid of the network prefix ('/64' for example) ipv6_addr=$(process_ips "$(ip -6 address show "$ipv6_interface" 2> /dev/null | grep inet | sed 's&/.*&&')") - ynh_print_info --message="Updating the AGH config file..." - # update the IP adresses in the AGH config file + ynh_print_info --message="Updating the AGH config file..." update_agh_ip_config # save the new setting @@ -75,6 +74,10 @@ set__dns_over_https() { ynh_print_warn --message="The variable 'dns_over_https' should be 'true' or 'false' but isn't, please report this." fi + # update the value in the AGH config file + ynh_print_info --message="Updating the AGH config file..." + ynh_write_var_in_file --file="$install_dir/AdGuardHome.yaml" --key="tls>enabled" --value="$dns_over_https" + # save the new setting ynh_app_setting_set "$app" --key=dns_over_https --value="$dns_over_https" }