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:
parent
09eba23f33
commit
5d75aa4a75
4 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue