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

if the DNS port is not 53, make sure it is

This commit is contained in:
OniriCorpe 2024-01-03 23:34:17 +01:00
parent 75c6179a61
commit 6863829604

View file

@ -45,6 +45,11 @@ elif [ -n "${dns_over_https:-}" ] || [ "${dns_over_https:-}" = false ]; then
ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https
fi
# if the DNS port is not 53, make sure it is
if ! [ "$(ynh_read_var_in_file --file="$install_dir/AdGuardHome.yaml" --key="port" --after="dns")" == "53" ]; then
ynh_write_var_in_file --file="$install_dir/AdGuardHome.yaml" --key="port" --after="dns" --value="53"
fi
# about all those 'ynh_write_var_in_file':
# AGH modifies by itself the config file when an user modifies it using the front-end
# so if we're using 'ynh_add_config' to process the config file, each