mirror of
https://github.com/YunoHost-Apps/galene_ynh.git
synced 2024-09-03 18:36:31 +02:00
Fix
This commit is contained in:
parent
3c60c7bdf7
commit
d2bdb4e9d5
8 changed files with 6 additions and 30 deletions
|
@ -33,7 +33,6 @@ For VoIP and video conferencing a TURN server is also installed and configured.
|
|||
|
||||
```
|
||||
sudo yunohost app setting galene turnserver_port
|
||||
sudo yunohost app setting galene turnserver_alt_port
|
||||
```
|
||||
|
||||
The TURN server will also choose a port dynamically when a new call starts. The range is between 49152 - 65535.
|
||||
|
|
|
@ -33,7 +33,6 @@ Pour la VoIP et la visioconférence, un serveur TURN est également installé et
|
|||
|
||||
```
|
||||
sudo yunohost app setting galene turnserver_port
|
||||
sudo yunohost app setting galene turnserver_alt_port
|
||||
```
|
||||
|
||||
Le serveur TURN choisira également un port de manière dynamique lors du démarrage d'une nouvelle visioconférence. La plage est comprise entre 49152 et 65535.
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
lt-cred-mech
|
||||
use-auth-secret
|
||||
static-auth-secret=__TURNSERVER_PWD__
|
||||
listening-port=__TURNSERVER_PORT__
|
||||
user=__APP__:__TURNSERVER_PWD__
|
||||
realm=__DOMAIN__
|
||||
|
||||
listening-port=__TURNSERVER_PORT__
|
||||
alt-listening-port=__TURNSERVER_ALT_PORT__
|
||||
min-port=49152
|
||||
max-port=65535
|
||||
|
||||
|
|
|
@ -2,11 +2,8 @@
|
|||
{
|
||||
"urls": [
|
||||
"turn:__DOMAIN__:__TURNSERVER_PORT__",
|
||||
"turn:__DOMAIN__:__TURNSERVER_ALT_PORT__",
|
||||
"turn:__DOMAIN__:__TURNSERVER_PORT__?transport=tcp",
|
||||
"turn:__DOMAIN__:__TURNSERVER_ALT_PORT__?transport=tcp",
|
||||
"turn:__DOMAIN__:__TURNSERVER_PORT__?transport=udp",
|
||||
"turn:__DOMAIN__:__TURNSERVER_ALT_PORT__?transport=udp"
|
||||
"turn:__DOMAIN__:__TURNSERVER_PORT__?transport=udp"
|
||||
],
|
||||
"username": "__APP__",
|
||||
"credential": "__TURNSERVER_PWD__",
|
||||
|
|
|
@ -27,10 +27,7 @@ domain=$YNH_APP_ARG_DOMAIN
|
|||
path_url="/"
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
ynh_print_OFF
|
||||
password=$YNH_APP_ARG_PASSWORD
|
||||
ynh_print_ON
|
||||
group_name=$YNH_APP_ARG_GROUP_NAME
|
||||
architecture=$(ynh_detect_arch)
|
||||
|
||||
|
@ -84,17 +81,14 @@ ynh_script_progression --message="Finding an available port..." --weight=3
|
|||
# Find an available port
|
||||
port=$(ynh_find_port --port=8443)
|
||||
turnserver_port=$(ynh_find_port --port=1194)
|
||||
turnserver_alt_port=$(ynh_find_port --port=$((turnserver_port+1)))
|
||||
|
||||
# Open the ports
|
||||
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
|
||||
ynh_exec_warn_less yunohost firewall allow Both $turnserver_port
|
||||
ynh_exec_warn_less yunohost firewall allow Both $turnserver_alt_port
|
||||
|
||||
# Store opened ports
|
||||
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||
ynh_app_setting_set --app=$app --key=turnserver_port --value=$turnserver_port
|
||||
ynh_app_setting_set --app=$app --key=turnserver_alt_port --value=$turnserver_alt_port
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
|
|
|
@ -20,7 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
turnserver_port=$(ynh_app_setting_get --app=$app --key=turnserver_port)
|
||||
turnserver_alt_port=$(ynh_app_setting_get --app=$app --key=turnserver_alt_port)
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
|
@ -98,11 +97,6 @@ then
|
|||
ynh_exec_warn_less yunohost firewall disallow Both $turnserver_port
|
||||
fi
|
||||
|
||||
if yunohost firewall list | grep -q "\- $turnserver_alt_port$"
|
||||
then
|
||||
ynh_exec_warn_less yunohost firewall disallow Both $turnserver_alt_port
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -33,10 +33,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
group_name=$(ynh_app_setting_get --app=$app --key=group_name)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
turnserver_port=$(ynh_app_setting_get --app=$app --key=turnserver_port)
|
||||
turnserver_alt_port=$(ynh_app_setting_get --app=$app --key=turnserver_alt_port)
|
||||
ynh_print_OFF
|
||||
turnserver_pwd=$(ynh_app_setting_get --app=$app --key=turnserver_pwd)
|
||||
ynh_print_ON
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
@ -132,7 +129,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
|
||||
ynh_exec_warn_less yunohost firewall allow Both $turnserver_alt_port
|
||||
|
||||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
|
|
|
@ -24,7 +24,6 @@ password=$(ynh_app_setting_get --app=$app --key=password)
|
|||
group_name=$(ynh_app_setting_get --app=$app --key=group_name)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
turnserver_port=$(ynh_app_setting_get --app=$app --key=turnserver_port)
|
||||
turnserver_alt_port=$(ynh_app_setting_get --app=$app --key=turnserver_alt_port)
|
||||
turnserver_pwd=$(ynh_app_setting_get --app=$app --key=turnserver_pwd)
|
||||
architecture=$(ynh_detect_arch)
|
||||
|
||||
|
@ -135,11 +134,11 @@ then
|
|||
ynh_replace_string --match_string="TURNSERVER_ENABLED=1" --replace_string="TURNSERVER_ENABLED=0" --target_file=/etc/default/coturn
|
||||
|
||||
# Set a port for each service in turnserver
|
||||
turnserver_alt_port=$(ynh_find_port --port=$((turnserver_port+1)))
|
||||
turnserver_port=$(ynh_find_port --port=1194)
|
||||
|
||||
ynh_app_setting_set --app=$app --key=turnserver_alt_port --value=$turnserver_alt_port
|
||||
ynh_app_setting_set --app=$app --key=turnserver_alt_port --value=$turnserver_port
|
||||
|
||||
yunohost firewall allow Both $turnserver_alt_port > /dev/null 2>&1
|
||||
ynh_exec_warn_less yunohost firewall allow Both $turnserver_port
|
||||
|
||||
#=================================================
|
||||
# MAKE A CLEAN LOGROTATE CONFIG
|
||||
|
|
Loading…
Add table
Reference in a new issue