diff --git a/scripts/remove b/scripts/remove index 28f82b8..db413ff 100644 --- a/scripts/remove +++ b/scripts/remove @@ -85,21 +85,20 @@ ynh_secure_remove --file="/var/log/$app/" ynh_secure_remove --file="/var/lib/turn/" #================================================= -# CLOSE A PORT +# CLOSE PORTS #================================================= -closeport() { - local port=$1 - if yunohost firewall list | grep -q "\- $turnserver_tls_port$" - then - ynh_script_progression --message="Closing port $turnserver_tls_port port" - ynh_exec_warn_less yunohost firewall disallow Both $turnserver_tls_port - elif yunohost firewall list | grep -q "\- $turnserver_alt_tls_port$" - then - ynh_script_progression --message="Closing port $turnserver_alt_tls_port port" - ynh_exec_warn_less yunohost firewall disallow Both $turnserver_alt_tls_port - fi -} +if yunohost firewall list | grep -q "\- $turnserver_tls_port$" +then + ynh_script_progression --message="Closing port $turnserver_tls_port$..." --weight=1 + ynh_exec_warn_less yunohost firewall disallow Both $turnserver_tls_port +fi + +if yunohost firewall list | grep -q "\- $turnserver_alt_tls_port$" +then + ynh_script_progression --message="Closing port $turnserver_alt_tls_port$..." --weight=1 + ynh_exec_warn_less yunohost firewall disallow Both $turnserver_alt_tls_port +fi #================================================= # GENERIC FINALIZATION