From 2048d10a6ed8459ad7a300e15151e3ac043307cf Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 9 Apr 2021 09:42:53 +0200 Subject: [PATCH] Update upgrade --- scripts/upgrade | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 287ddd2..9af7889 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -37,6 +37,12 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +# If open, close direct access to $port in firewall +if yunohost firewall list | grep -q "\- $port$" +then + ynh_exec_warn_less yunohost firewall disallow TCP $port +fi + # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path=/opt/yunohost/$app