1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/coturn_ynh.git synced 2024-09-03 18:16:32 +02:00

Closing ports

This commit is contained in:
ericgaspar 2021-01-25 11:21:17 +01:00
parent 9245323154
commit 389466f6c5
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -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