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/"
|
ynh_secure_remove --file="/var/lib/turn/"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CLOSE A PORT
|
# CLOSE PORTS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
closeport() {
|
if yunohost firewall list | grep -q "\- $turnserver_tls_port$"
|
||||||
local port=$1
|
then
|
||||||
if yunohost firewall list | grep -q "\- $turnserver_tls_port$"
|
ynh_script_progression --message="Closing port $turnserver_tls_port$..." --weight=1
|
||||||
then
|
|
||||||
ynh_script_progression --message="Closing port $turnserver_tls_port port"
|
|
||||||
ynh_exec_warn_less yunohost firewall disallow Both $turnserver_tls_port
|
ynh_exec_warn_less yunohost firewall disallow Both $turnserver_tls_port
|
||||||
elif yunohost firewall list | grep -q "\- $turnserver_alt_tls_port$"
|
fi
|
||||||
then
|
|
||||||
ynh_script_progression --message="Closing port $turnserver_alt_tls_port port"
|
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
|
ynh_exec_warn_less yunohost firewall disallow Both $turnserver_alt_tls_port
|
||||||
fi
|
fi
|
||||||
}
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
Loading…
Add table
Reference in a new issue