From f198af5425f37ec0a1c48d220a82fff7be927c3a Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 26 Dec 2023 23:35:34 +0100 Subject: [PATCH] use a custom setter in place of ynh_app_config_apply --- config_panel.toml | 1 - scripts/config | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index ce27c17..506d655 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -6,7 +6,6 @@ services = ["__APP__"] [main.options.dns_over_https] ask = "Enable DNS-over-HTTPS/QUIC" -bind = "tls>enabled:__INSTALL_DIR__/AdGuardHome.yaml" no = "false" type = "boolean" yes = "true" diff --git a/scripts/config b/scripts/config index 5f585f8..e3eacfb 100644 --- a/scripts/config +++ b/scripts/config @@ -12,11 +12,10 @@ source /usr/share/yunohost/helpers ynh_abort_if_errors #================================================= -# CUSTOM THINGS +# SPECIFIC SETTERS #================================================= -ynh_app_config_apply() { - _ynh_app_config_apply +set__dns_over_https() { if [ "$dns_over_https" == "true" ]; then ynh_script_progression --message="Opening DoH and DoQ ports..." @@ -37,4 +36,7 @@ ynh_app_config_apply() { ynh_print_warn --message="The variable 'dns_over_https' should be 'true' or 'false' but isn't, please report this." fi -} \ No newline at end of file + # save the new setting + ynh_app_setting_set "$app" prices "$dns_over_https" +} +