From 7b75ef1e2da1af8b919a8a717f932b0c648cc802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 3 Jun 2023 15:20:02 +0200 Subject: [PATCH 01/12] cleaning --- doc/ADMIN.md | 6 ------ doc/ADMIN_fr.md | 4 ---- doc/DESCRIPTION_fr.md | 1 + scripts/install | 7 ------- scripts/restore | 3 --- scripts/upgrade | 5 ----- 6 files changed, 1 insertion(+), 25 deletions(-) create mode 100644 doc/DESCRIPTION_fr.md 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/scripts/install b/scripts/install index 6d9b4cc..4cf58ec 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 @@ -55,9 +52,6 @@ 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 @@ -82,7 +76,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 diff --git a/scripts/restore b/scripts/restore index 3c4a2e0..6e893d4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -42,9 +42,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 diff --git a/scripts/upgrade b/scripts/upgrade index 8297176..a4210cb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,9 +49,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 +69,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 From 631adb1245c835f756f6784661183048440532c6 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 3 Jun 2023 13:20:08 +0000 Subject: [PATCH 02/12] Auto-update README --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index 62fd13f..bcb022b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,7 +16,7 @@ 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 ## Documentations et ressources From b11c412c7a8b8ca9313ea796dc783d211923956e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 3 Jun 2023 15:20:39 +0200 Subject: [PATCH 03/12] Delete check_process --- check_process | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 check_process 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& From 1acb50c2f79a9bdce21c0b5ac3032dcce549d922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 18 Aug 2023 11:28:41 +0200 Subject: [PATCH 04/12] Update manifest.toml --- manifest.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index c026fc4..e0e85b4 100644 --- a/manifest.toml +++ b/manifest.toml @@ -26,7 +26,6 @@ ram.runtime = "50M" [install.domain] type = "domain" - full_domain = true [resources] [resources.ports] From 5d242436a68cd23b965e625a80be29e2fd52a3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 18 Aug 2023 11:28:49 +0200 Subject: [PATCH 05/12] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index e0e85b4..11cf743 100644 --- a/manifest.toml +++ b/manifest.toml @@ -15,7 +15,7 @@ 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" From ca3b04652f53757612cf5ca9964d155ef15660ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 9 Dec 2023 22:10:48 +0100 Subject: [PATCH 06/12] cleaning --- manifest.toml | 5 ++++- scripts/install | 4 ++-- scripts/upgrade | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 11cf743..424d18b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,8 +18,11 @@ code = "https://github.com/coturn/coturn" yunohost = ">= 11.2" architectures = "all" multi_instance = false + ldap = "not_relevant" + sso = "not_relevant" + disk = "50M" ram.build = "50M" ram.runtime = "50M" @@ -44,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/install b/scripts/install index 4cf58ec..d6ca56b 100644 --- a/scripts/install +++ b/scripts/install @@ -58,7 +58,7 @@ 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 @@ -86,7 +86,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/upgrade b/scripts/upgrade index a4210cb..af68cbe 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -78,7 +78,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 From 8566a75414a0cc3fb0ed880802575cf16a98726e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 26 Dec 2023 18:06:58 +0100 Subject: [PATCH 07/12] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index d6ca56b..eb19b75 100644 --- a/scripts/install +++ b/scripts/install @@ -44,6 +44,7 @@ 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 + # Create a dedicated systemd config ynh_add_systemd_config From 502de527fe4fb13c3473becba7bade12d4fdb7be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 26 Dec 2023 18:08:42 +0100 Subject: [PATCH 08/12] Update remove --- scripts/remove | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) 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 #================================================= From 7b65f207ddb1feee7dd833f678cdc71de7691af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 26 Dec 2023 18:09:52 +0100 Subject: [PATCH 09/12] Update restore --- scripts/restore | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/restore b/scripts/restore index 6e893d4..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 @@ -69,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" #================================================= From b693a2801f686f4a7aadeb02ac51dd990d59408f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 26 Dec 2023 18:12:55 +0100 Subject: [PATCH 10/12] cleaning --- scripts/backup | 1 + scripts/install | 3 ++- scripts/upgrade | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) 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 eb19b75..7c7056c 100644 --- a/scripts/install +++ b/scripts/install @@ -42,8 +42,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 diff --git a/scripts/upgrade b/scripts/upgrade index af68cbe..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 From 346850e7af04e40ce87cae8a15bd248b4a528539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 17 Jan 2024 23:27:32 +0100 Subject: [PATCH 11/12] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 424d18b..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"] From 416e544bf3534dc2ebf7d68d942cec0314338b51 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 17 Jan 2024 22:27:36 +0000 Subject: [PATCH 12/12] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 b4a277e..c53c8f9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po 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 :