diff --git a/scripts/install b/scripts/install index a1d950c..16112f6 100644 --- a/scripts/install +++ b/scripts/install @@ -38,7 +38,7 @@ if [[ $open_port_53 == 0 ]]; then ynh_exec_warn_less yunohost firewall reload else open_port_53="false" - ynh_print_info --message="Port 53 is already closed." + ynh_print_info --message="Port 53 is closed." fi ynh_app_setting_set --app="$app" --key=open_port_53 --value="$open_port_53" diff --git a/scripts/upgrade b/scripts/upgrade index 8dd0766..c4c7516 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,22 +33,26 @@ if [ -z "${open_port_53:-}" ] && [ "${open_port_53:-}" = true ]; then open_port_53="true" ynh_app_setting_set --app="$app" --key=open_port_53 --value="$open_port_53" # if open_port_53 is true, we need to open port 53 + ynh_print_info --message="Opening port 53..." ynh_exec_warn_less yunohost firewall allow Both 53 ynh_exec_warn_less yunohost firewall reload elif [ -n "${open_port_53:-}" ] || [ "${open_port_53:-}" = false ]; then open_port_53="false" ynh_app_setting_set --app="$app" --key=open_port_53 --value="$open_port_53" + ynh_print_info --message="Port 53 is closed." fi if [ -z "${dns_over_https:-}" ] && [ "${dns_over_https:-}" = true ]; then dns_over_https="true" ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https - # no need to open the ports, as they were opened at the 'Provisioning ports' step + # no need to open the ports, as they were opened at the 'Provisioning ports' step + ynh_print_info --message="DoH and DoQ ports are open." elif [ -n "${dns_over_https:-}" ] || [ "${dns_over_https:-}" = false ]; then dns_over_https="false" ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https - # if dns_over_https is false, we need to close ports, + # if dns_over_https is false, we need to close ports, # as they were opened at the 'Provisioning ports' step + ynh_print_info --message="Closing DoH and DoQ ports..." ynh_exec_warn_less yunohost firewall disallow Both "$port_dns_over_http" ynh_exec_warn_less yunohost firewall disallow UDP "$port_dns_over_quic" ynh_exec_warn_less yunohost firewall reload