mirror of
https://github.com/YunoHost-Apps/adguardhome_ynh.git
synced 2024-09-03 18:06:23 +02:00
use a custom setter in place of ynh_app_config_apply
This commit is contained in:
parent
8aa3f1508b
commit
f198af5425
2 changed files with 6 additions and 5 deletions
|
@ -6,7 +6,6 @@ services = ["__APP__"]
|
||||||
|
|
||||||
[main.options.dns_over_https]
|
[main.options.dns_over_https]
|
||||||
ask = "Enable DNS-over-HTTPS/QUIC"
|
ask = "Enable DNS-over-HTTPS/QUIC"
|
||||||
bind = "tls>enabled:__INSTALL_DIR__/AdGuardHome.yaml"
|
|
||||||
no = "false"
|
no = "false"
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
yes = "true"
|
yes = "true"
|
||||||
|
|
|
@ -12,11 +12,10 @@ source /usr/share/yunohost/helpers
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CUSTOM THINGS
|
# SPECIFIC SETTERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_config_apply() {
|
set__dns_over_https() {
|
||||||
_ynh_app_config_apply
|
|
||||||
|
|
||||||
if [ "$dns_over_https" == "true" ]; then
|
if [ "$dns_over_https" == "true" ]; then
|
||||||
ynh_script_progression --message="Opening DoH and DoQ ports..."
|
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."
|
ynh_print_warn --message="The variable 'dns_over_https' should be 'true' or 'false' but isn't, please report this."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# save the new setting
|
||||||
|
ynh_app_setting_set "$app" prices "$dns_over_https"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue