From fced44bdb10e3d3d9e34db02c1cf394ddd49cd42 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 27 Dec 2023 01:20:28 +0100 Subject: [PATCH] fix unbound var --- scripts/upgrade | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 30961f2..fbc964e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,6 +29,7 @@ ynh_systemd_action --service_name="$app" --action="stop" #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +ynh_app_setting_get --app="$app" --key=dns_over_https if [ -n "$dns_over_https" ] && [ "$dns_over_https" == "1" ]; then dns_over_https="true" ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https @@ -43,19 +44,20 @@ elif [ -z "$dns_over_https" ] || [ "$dns_over_https" == "0" ]; then ynh_exec_warn_less yunohost firewall reload fi +ynh_app_setting_get --app="$app" --key=open_port_53 if [ -n "$open_port_53" ] && [ "$open_port_53" == "1" ]; then open_port_53="true" + ynh_app_setting_set --app="$app" --key=open_port_53 --value="$open_port_53" # no need to open th port, as it were opened at the 'Provisioning ports' step elif [ -z "$open_port_53" ] || [ "$open_port_53" == "0" ]; then open_port_53="false" + ynh_app_setting_set --app="$app" --key=open_port_53 --value="$open_port_53" # if open_port_53 is false, we need to close port, # as it were opened at the 'Provisioning ports' step ynh_exec_warn_less yunohost firewall disallow Both "$port_dns_over_http" ynh_exec_warn_less yunohost firewall reload fi -ynh_app_setting_set --app="$app" --key=open_port_53 --value="$open_port_53" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #=================================================