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:
parent
9245323154
commit
389466f6c5
1 changed files with 12 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue