1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/transmission_ynh.git synced 2024-09-04 01:46:12 +02:00

peer_port also on UDP

This commit is contained in:
Maniack Crudelis 2018-03-03 18:53:33 +01:00
parent 09eba23f33
commit 5d75aa4a75
4 changed files with 6 additions and 3 deletions

View file

@ -59,7 +59,7 @@ ynh_app_setting_set $app port $port
# Find a free port
peer_port=$(ynh_find_port 51413)
# Open this port
yunohost firewall allow TCP $peer_port >/dev/null 2>&1
yunohost firewall allow Both $peer_port >/dev/null 2>&1
ynh_app_setting_set $app peer_port $peer_port
#=================================================

View file

@ -51,7 +51,7 @@ fi
if yunohost firewall list | grep -q "\- $peer_port$"
then
echo "Close port $peer_port"
yunohost firewall disallow TCP $peer_port 2>&1
yunohost firewall disallow Both $peer_port 2>&1
fi
#=================================================

View file

@ -52,7 +52,7 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
yunohost firewall allow --no-upnp TCP $port >/dev/null 2>&1
yunohost firewall allow TCP $peer_port >/dev/null 2>&1
yunohost firewall allow Both $peer_port >/dev/null 2>&1
#=================================================
# SPECIFIC RESTORE

View file

@ -33,6 +33,9 @@ if [ -z $peer_port ]; then
ynh_app_setting_set $app peer_port $peer_port
fi
# Add peer_port also on UDP.
yunohost firewall allow UDP $peer_port >/dev/null 2>&1
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================