diff --git a/README.md b/README.md index d121a89..052753e 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/README_fr.md b/README_fr.md index dfb19c2..c53c8f9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -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 : diff --git a/check_process b/check_process deleted file mode 100644 index 515f2d0..0000000 --- a/check_process +++ /dev/null @@ -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& diff --git a/doc/ADMIN.md b/doc/ADMIN.md index e3f378d..79ee96c 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -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. diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index d20abe8..869a0a3 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -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. diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..f61ef2f --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -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. \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index c026fc4..6a0d037 100644 --- a/manifest.toml +++ b/manifest.toml @@ -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" diff --git a/scripts/backup b/scripts/backup index a00c642..af4a982 100644 --- a/scripts/backup +++ b/scripts/backup @@ -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" #================================================= diff --git a/scripts/install b/scripts/install index 6d9b4cc..7c7056c 100644 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/remove b/scripts/remove index 6c47d00..e9a5110 100644 --- a/scripts/remove +++ b/scripts/remove @@ -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 #================================================= diff --git a/scripts/restore b/scripts/restore index 3c4a2e0..ec7d0be 100644 --- a/scripts/restore +++ b/scripts/restore @@ -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" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8297176..4e05931 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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