1
0
Fork 0
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:
Maniack Crudelis 2019-01-31 11:53:22 +01:00
parent 5ebc66ef88
commit 0c2af89b61
2 changed files with 6 additions and 2 deletions

View file

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

View file

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