mirror of
https://github.com/YunoHost-Apps/lutim_ynh.git
synced 2024-09-03 19:36:24 +02:00
Do not open port
This commit is contained in:
parent
5ebc66ef88
commit
0c2af89b61
2 changed files with 6 additions and 2 deletions
|
@ -70,8 +70,6 @@ ynh_script_progression --message="Find a free port" --weight=3
|
||||||
|
|
||||||
# Find a free port
|
# Find a free port
|
||||||
port=$(ynh_find_port 8095)
|
port=$(ynh_find_port 8095)
|
||||||
# Open this port
|
|
||||||
ynh_exec_fully_quiet yunohost firewall allow --no-upnp TCP $port
|
|
||||||
ynh_app_setting_set $app port $port
|
ynh_app_setting_set $app port $port
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -93,6 +93,12 @@ if [ -z "$secret" ]; then
|
||||||
ynh_app_setting_set $app secret $secret
|
ynh_app_setting_set $app secret $secret
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Close opened port
|
||||||
|
if yunohost firewall list | grep -q "\- $port$"
|
||||||
|
then
|
||||||
|
ynh_exec_quiet yunohost firewall disallow TCP $port
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue