mirror of
https://github.com/YunoHost-Apps/jellyfin_ynh.git
synced 2024-09-03 19:26:29 +02:00
Offer to open discovery ports in restore and upgrade
This commit is contained in:
parent
430685b8d1
commit
2784b22d18
2 changed files with 52 additions and 0 deletions
|
@ -51,6 +51,32 @@ fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORATION STEPS
|
# STANDARD RESTORATION STEPS
|
||||||
|
#=================================================
|
||||||
|
# OPEN PORTS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
if [ $discovery -eq 1 ]; then
|
||||||
|
ynh_script_progression --message="Configuring firewall..." --time --weight=1
|
||||||
|
|
||||||
|
# Open port 1900 for service auto-discovery
|
||||||
|
if ynh_port_available --port=1900; then
|
||||||
|
ynh_exec_warn_less yunohost firewall allow UDP 1900
|
||||||
|
ynh_app_setting_set --app=$app --key=discovery_service --value=1
|
||||||
|
else
|
||||||
|
ynh_print_warn --message="Port 1900 (for service auto-discovery) is not available. Continuing nonetheless."
|
||||||
|
ynh_app_setting_set --app=$app --key=discovery_service --value=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Open port 7359 for client auto-discovery
|
||||||
|
if ynh_port_available --port=7359; then
|
||||||
|
ynh_exec_warn_less yunohost firewall allow UDP 7359
|
||||||
|
ynh_app_setting_set --app=$app --key=discovery_client --value=1
|
||||||
|
else
|
||||||
|
ynh_print_warn --message="Port 7359 (for client auto-discovery) is not available. Continuing nonetheless."
|
||||||
|
ynh_app_setting_set --app=$app --key=discovery_client --value=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
# RESTORE THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -87,6 +87,32 @@ ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
|
#=================================================
|
||||||
|
# OPEN PORTS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
if [ $discovery -eq 1 ]; then
|
||||||
|
ynh_script_progression --message="Configuring firewall..." --time --weight=1
|
||||||
|
|
||||||
|
# Open port 1900 for service auto-discovery
|
||||||
|
if ynh_port_available --port=1900; then
|
||||||
|
ynh_exec_warn_less yunohost firewall allow UDP 1900
|
||||||
|
ynh_app_setting_set --app=$app --key=discovery_service --value=1
|
||||||
|
else
|
||||||
|
ynh_print_warn --message="Port 1900 (for service auto-discovery) is not available. Continuing nonetheless."
|
||||||
|
ynh_app_setting_set --app=$app --key=discovery_service --value=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Open port 7359 for client auto-discovery
|
||||||
|
if ynh_port_available --port=7359; then
|
||||||
|
ynh_exec_warn_less yunohost firewall allow UDP 7359
|
||||||
|
ynh_app_setting_set --app=$app --key=discovery_client --value=1
|
||||||
|
else
|
||||||
|
ynh_print_warn --message="Port 7359 (for client auto-discovery) is not available. Continuing nonetheless."
|
||||||
|
ynh_app_setting_set --app=$app --key=discovery_client --value=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STOP SYSTEMD SERVICE
|
# STOP SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue