mirror of
https://github.com/YunoHost-Apps/galene_ynh.git
synced 2024-09-03 18:36:31 +02:00
parent
824143672c
commit
a4531a8816
4 changed files with 9 additions and 10 deletions
|
@ -85,7 +85,6 @@ port=$(ynh_find_port --port=8443)
|
|||
turnserver_port=$(ynh_find_port --port=1194)
|
||||
|
||||
# Open the ports
|
||||
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
|
||||
ynh_exec_warn_less yunohost firewall allow Both $turnserver_port
|
||||
|
||||
# Store opened ports
|
||||
|
@ -254,7 +253,7 @@ chmod 600 $final_path/data/ice-servers.json
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
|
||||
|
||||
yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" --needs_exposed_ports $port
|
||||
yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log"
|
||||
yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports $turnserver_port
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -87,11 +87,6 @@ ynh_remove_logrotate
|
|||
#=================================================
|
||||
ynh_script_progression --message="Closing ports..." --weight=1
|
||||
|
||||
if yunohost firewall list | grep -q "\- $port$"
|
||||
then
|
||||
ynh_exec_warn_less yunohost firewall disallow TCP $port
|
||||
fi
|
||||
|
||||
if yunohost firewall list | grep -q "\- $turnserver_port$"
|
||||
then
|
||||
ynh_exec_warn_less yunohost firewall disallow Both $turnserver_port
|
||||
|
|
|
@ -96,7 +96,7 @@ systemctl enable coturn-$app.service --quiet
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
|
||||
|
||||
yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" --needs_exposed_ports $port
|
||||
yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log"
|
||||
yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports $turnserver_port
|
||||
|
||||
#=================================================
|
||||
|
@ -127,7 +127,6 @@ fi
|
|||
#=================================================
|
||||
|
||||
# Ouvre le port dans le firewall
|
||||
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
|
||||
ynh_exec_warn_less yunohost firewall allow Both $turnserver_port
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -37,6 +37,12 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
# If open, close direct access to $port in firewall
|
||||
if yunohost firewall list | grep -q "\- $port$"
|
||||
then
|
||||
ynh_exec_warn_less yunohost firewall disallow TCP $port
|
||||
fi
|
||||
|
||||
# If final_path doesn't exist, create it
|
||||
if [ -z "$final_path" ]; then
|
||||
final_path=/opt/yunohost/$app
|
||||
|
@ -270,7 +276,7 @@ ynh_use_logrotate --non-append
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
|
||||
|
||||
yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" --needs_exposed_ports $port
|
||||
yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log"
|
||||
yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports $turnserver_port
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue