mirror of
https://github.com/YunoHost-Apps/coturn_ynh.git
synced 2024-09-03 18:16:32 +02:00
commit
41e966afbb
12 changed files with 26 additions and 97 deletions
|
@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
The TURN Server is a VoIP media traffic NAT traversal server and gateway. It can be used as a general-purpose network traffic TURN server and gateway, too.
|
||||
|
||||
**Shipped version:** 4.5.2.3~ynh3
|
||||
**Shipped version:** 4.5.2.3~ynh4
|
||||
## Documentation and resources
|
||||
|
||||
* Official admin documentation: <https://github.com/coturn/coturn/wiki>
|
||||
|
|
|
@ -16,9 +16,9 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
|||
|
||||
## Vue d’ensemble
|
||||
|
||||
The TURN Server is a VoIP media traffic NAT traversal server and gateway. It can be used as a general-purpose network traffic TURN server and gateway, too.
|
||||
Le serveur TURN est un serveur et une passerelle NAT pour le trafic multimédia VoIP. Il peut également être utilisé comme serveur et passerelle TURN de trafic réseau à usage général.
|
||||
|
||||
**Version incluse :** 4.5.2.3~ynh3
|
||||
**Version incluse :** 4.5.2.3~ynh4
|
||||
## Documentations et ressources
|
||||
|
||||
* Documentation officielle de l’admin : <https://github.com/coturn/coturn/wiki>
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
;; Test complet
|
||||
; Manifest
|
||||
domain="domain.tld"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=0
|
||||
setup_root=0
|
||||
setup_nourl=1
|
||||
setup_private=0
|
||||
setup_public=0
|
||||
upgrade=1
|
||||
upgrade=1 from_commit=2b6e951ded8c7d3dc0ad87aa8160ab64af976f68
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
port_already_use=0
|
||||
change_url=0
|
||||
;;; Options
|
||||
Email=
|
||||
Notification=none
|
||||
;;; Upgrade options
|
||||
; commit=2b6e951ded8c7d3dc0ad87aa8160ab64af976f68
|
||||
name=Make curl silent
|
||||
manifest_arg=domain=DOMAIN&
|
|
@ -1,9 +1,3 @@
|
|||
## Configuration
|
||||
|
||||
You need to install TURN server in a root or subdomain like `__DOMAIN__`
|
||||
|
||||
How to configure this app: a plain file with SSH.
|
||||
|
||||
## Testing
|
||||
|
||||
For testing we can use Trickle-Ice testing tool. Go to [trickle-ice page](https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice) and enter following details.
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
## Configuration
|
||||
|
||||
Vous devez installer coTURN à la racine ou un sous-domaine comme `__DOMAIN__`
|
||||
|
||||
## Testing
|
||||
|
||||
Pour les tests, vous pouvez utiliser l'outil de test Trickle-Ice. Accédez à la page [trickle-ice](https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice) et entrez les détails suivants.
|
||||
|
|
1
doc/DESCRIPTION_fr.md
Normal file
1
doc/DESCRIPTION_fr.md
Normal file
|
@ -0,0 +1 @@
|
|||
Le serveur TURN est un serveur et une passerelle NAT pour le trafic multimédia VoIP. Il peut également être utilisé comme serveur et passerelle TURN de trafic réseau à usage général.
|
|
@ -5,7 +5,7 @@ name = "Coturn"
|
|||
description.en = "VoIP media traffic NAT traversal server and gateway"
|
||||
description.fr = "Serveur et passerelle NAT du trafic média VoIP"
|
||||
|
||||
version = "4.5.2.3~ynh3"
|
||||
version = "4.5.2.3~ynh4"
|
||||
|
||||
maintainers = ["eric_G"]
|
||||
|
||||
|
@ -15,18 +15,20 @@ admindoc = "https://github.com/coturn/coturn/wiki"
|
|||
code = "https://github.com/coturn/coturn"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.1.19"
|
||||
yunohost = ">= 11.2"
|
||||
architectures = "all"
|
||||
multi_instance = false
|
||||
|
||||
ldap = "not_relevant"
|
||||
|
||||
sso = "not_relevant"
|
||||
|
||||
disk = "50M"
|
||||
ram.build = "50M"
|
||||
ram.runtime = "50M"
|
||||
|
||||
[install.domain]
|
||||
type = "domain"
|
||||
full_domain = true
|
||||
|
||||
[resources]
|
||||
[resources.ports]
|
||||
|
@ -45,4 +47,4 @@ ram.runtime = "50M"
|
|||
[resources.permissions]
|
||||
|
||||
[resources.apt]
|
||||
packages = "sqlite3 libsqlite3-dev coturn acl"
|
||||
packages = "sqlite3, libsqlite3-dev, coturn, acl"
|
||||
|
|
|
@ -34,6 +34,7 @@ ynh_backup --src_path="$data_dir"
|
|||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/var/log/$app"
|
||||
|
||||
ynh_backup --src_path="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -20,9 +20,6 @@ ynh_app_setting_set --app=$app --key=no_sso --value=true
|
|||
#=================================================
|
||||
ynh_script_progression --message="Creating a dhparam file..." --weight=3
|
||||
|
||||
# WARNING : theses command are used in INSTALL, UPGRADE, RESTORE
|
||||
# For any update do it in all files
|
||||
|
||||
# Make dhparam cert for Coturn if it doesn't exist
|
||||
if [ ! -e /etc/ssl/private/dh2048.pem ]
|
||||
then
|
||||
|
@ -45,8 +42,10 @@ adduser turnserver ssl-cert
|
|||
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
||||
|
||||
mkdir -p /var/log/$app
|
||||
|
||||
# Create systemd service for turnserver
|
||||
cp ../conf/default.coturn /etc/default/coturn
|
||||
ynh_add_config --template="default.coturn" --destination="/etc/default/coturn"
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
|
@ -55,16 +54,13 @@ ynh_add_systemd_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring Coturn..." --weight=1
|
||||
|
||||
# WARNING: theses command are used in INSTALL, UPGRADE
|
||||
# For any update do it in all files
|
||||
|
||||
# Find password for turnserver
|
||||
turnserver_pwd=$(ynh_string_random --length=30)
|
||||
ynh_app_setting_set --app=$app --key=turnserver_pwd --value=$turnserver_pwd
|
||||
|
||||
coturn_config_path="/etc/turnserver.conf"
|
||||
|
||||
ynh_add_config --template="../conf/turnserver.conf" --destination="$coturn_config_path"
|
||||
ynh_add_config --template="turnserver.conf" --destination="$coturn_config_path"
|
||||
|
||||
# Get public IP and set as external IP for coturn
|
||||
# note: '|| true' is used to ignore the errors if we can't get the public ipv4 or ipv6
|
||||
|
@ -82,7 +78,6 @@ ynh_store_file_checksum --file="$coturn_config_path"
|
|||
# ADD SCRIPT FOR COTURN CRON
|
||||
#=================================================
|
||||
|
||||
# WARNING : theses command are used in INSTALL, UPGRADE
|
||||
# For any update do it in all files
|
||||
cp -f ../sources/Coturn_config_rotate.sh $data_dir/
|
||||
ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file=$data_dir/Coturn_config_rotate.sh
|
||||
|
@ -93,7 +88,7 @@ chmod +x $data_dir/Coturn_config_rotate.sh
|
|||
# SET COTURN CRON
|
||||
#=================================================
|
||||
|
||||
ynh_add_config --template="../conf/cron_coturn" --destination="/etc/cron.d/$app"
|
||||
ynh_add_config --template="cron_coturn" --destination="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
|
|
|
@ -14,57 +14,29 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
then
|
||||
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
||||
yunohost service remove $app
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STOP AND REMOVE SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
|
||||
|
||||
# Remove the dedicated systemd config
|
||||
ynh_remove_systemd_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing Coturn configuration file..." --weight=2
|
||||
|
||||
ynh_secure_remove --file="/etc/turnserver.conf"
|
||||
|
||||
#=================================================
|
||||
# REMOVE LOGROTATE CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
|
||||
|
||||
# Remove the app-specific logrotate config
|
||||
ynh_remove_logrotate
|
||||
|
||||
#=================================================
|
||||
# REMOVE SCRIPT
|
||||
#=================================================
|
||||
|
||||
# Remove coturn/Coturn_config_rotate.sh
|
||||
ynh_secure_remove --file="/home/yunohost.app/$app"
|
||||
|
||||
#=================================================
|
||||
# REMOVE CRON JOB
|
||||
#=================================================
|
||||
|
||||
# Remove a cron file
|
||||
ynh_secure_remove --file=/etc/cron.d/$app
|
||||
|
||||
# Remove the log files
|
||||
ynh_secure_remove --file=/var/log/$app
|
||||
|
||||
# Remove the sqlitedb file
|
||||
#ynh_secure_remove --file=/var/lib/turn
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -19,9 +19,12 @@ ynh_restore_file --origin_path="/etc/turnserver.conf"
|
|||
#=================================================
|
||||
# RESTORE THE COTURN DATAPATH
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring Coturn Datapath..." --weight=1
|
||||
ynh_script_progression --message="Restoring the data directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/home/yunohost.app/$app"
|
||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
|
||||
# (Same as for install dir)
|
||||
chown -R $app:www-data "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE LOG
|
||||
|
@ -42,9 +45,6 @@ adduser turnserver ssl-cert
|
|||
#=================================================
|
||||
ynh_script_progression --message="Creating a dhparam file..." --weight=3
|
||||
|
||||
# WARNING : theses command are used in INSTALL, UPGRADE, RESTORE
|
||||
# For any update do it in all files
|
||||
|
||||
# Make dhparam cert for Coturn if it doesn't exist
|
||||
if [ ! -e /etc/ssl/private/dh2048.pem ]
|
||||
then
|
||||
|
@ -72,11 +72,6 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig
|
|||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service --quiet
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Coturn TURN server" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_turnserver_tls"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -38,8 +38,9 @@ adduser turnserver ssl-cert
|
|||
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
||||
|
||||
mkdir -p /var/log/$app
|
||||
|
||||
# Create systemd service for turnserver
|
||||
cp ../conf/default.coturn /etc/default/coturn
|
||||
ynh_add_config --template="default.coturn" --destination="/etc/default/coturn"
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
@ -49,9 +50,6 @@ ynh_add_systemd_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring Coturn..." --weight=2
|
||||
|
||||
# WARNING: theses command are used in INSTALL, UPGRADE
|
||||
# For any update do it in all files
|
||||
|
||||
coturn_config_path="/etc/turnserver.conf"
|
||||
|
||||
ynh_add_config --template="../conf/turnserver.conf" --destination="$coturn_config_path"
|
||||
|
@ -72,8 +70,6 @@ ynh_store_file_checksum --file="$coturn_config_path"
|
|||
# ADD SCRIPT FOR COTURN CRON
|
||||
#=================================================
|
||||
|
||||
# WARNING : theses command are used in INSTALL, UPGRADE
|
||||
# For any update do it in all files
|
||||
cp -f ../sources/Coturn_config_rotate.sh $data_dir/
|
||||
ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file=$data_dir/Coturn_config_rotate.sh
|
||||
|
||||
|
@ -83,7 +79,7 @@ chmod +x $data_dir/Coturn_config_rotate.sh
|
|||
# SET COTURN CRON
|
||||
#=================================================
|
||||
|
||||
ynh_add_config --template="../conf/cron_coturn" --destination="/etc/cron.d/$app"
|
||||
ynh_add_config --template="cron_coturn" --destination="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# MIGRATION 3 : USE STANDARD ACCESS FOR CERTIFCATE
|
||||
|
|
Loading…
Add table
Reference in a new issue