From 4a84e2c6310063344cb9d6853da63294caa30c61 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Mar 2021 01:13:38 +0100 Subject: [PATCH 01/11] Make curl silent --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 71d3712..1926f0b 100644 --- a/scripts/install +++ b/scripts/install @@ -128,8 +128,8 @@ ynh_print_ON # 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 -public_ip4="$(curl ip.yunohost.org)" || true -public_ip6="$(curl ipv6.yunohost.org)" || true +public_ip4="$(curl -s ip.yunohost.org)" || true +public_ip6="$(curl -s ipv6.yunohost.org)" || true if ( [[ -n "$public_ip4" ]] && ynh_validate_ip4 --ip_address="$public_ip4" || [[ -n "$public_ip6" ]] && ynh_validate_ip6 --ip_address="$public_ip6" ) then From b67d3a8025ca9f454d3396c47b30696e5dd1fa39 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Mar 2021 01:13:54 +0100 Subject: [PATCH 02/11] Make curl silent --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5cf0cd7..1696e74 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,8 +104,8 @@ ynh_print_ON # 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 -public_ip4="$(curl ip.yunohost.org)" || true -public_ip6="$(curl ipv6.yunohost.org)" || true +public_ip4="$(curl -s ip.yunohost.org)" || true +public_ip6="$(curl -s ipv6.yunohost.org)" || true if ( [[ -n "$public_ip4" ]] && ynh_validate_ip4 --ip_address="$public_ip4" || [[ -n "$public_ip6" ]] && ynh_validate_ip6 --ip_address="$public_ip6" ) then From 97c3330eb255491ed3202fa1c774be4eb9f762e9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 3 Mar 2021 12:50:33 +0100 Subject: [PATCH 03/11] Silence cURL --- sources/Coturn_config_rotate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/Coturn_config_rotate.sh b/sources/Coturn_config_rotate.sh index ce7d6c5..8688b44 100644 --- a/sources/Coturn_config_rotate.sh +++ b/sources/Coturn_config_rotate.sh @@ -6,8 +6,8 @@ coturn_config_path="/etc/turnserver.conf" external_IP_line="external-ip=__IPV4__/__IPV6__" -public_ip4="$(curl ip.yunohost.org)" || true -public_ip6="$(curl ipv6.yunohost.org)" || true +public_ip4="$(curl -s ip.yunohost.org)" || true +public_ip6="$(curl -s ipv6.yunohost.org)" || true if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4" then From 0cffeb872647e825e01a282f2aa5b625272037a2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 4 Mar 2021 13:07:48 +0100 Subject: [PATCH 04/11] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 5a1fed2..3228fd4 100644 --- a/manifest.json +++ b/manifest.json @@ -10,7 +10,7 @@ "url": "https://github.com/coturn/coturn", "license": "BSD-3-Clause", "maintainer": { - "name": "", + "name": "eric_G", "email": "" }, "requirements": { From 8699c5392e51a19bf48997e4d7caa541b8c99ab6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 18 Mar 2021 08:43:36 +0100 Subject: [PATCH 05/11] Update manifest.json --- manifest.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/manifest.json b/manifest.json index 3228fd4..f5c0331 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "VoIP media traffic NAT traversal server and gateway", "fr": "Serveur et passerelle NAT du trafic média VoIP" }, - "version": "4.5.1.1~ynh1", + "version": "4.5.1.1~ynh2", "url": "https://github.com/coturn/coturn", "license": "BSD-3-Clause", "maintainer": { @@ -14,7 +14,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.7" }, "multi_instance": false, "services": [ @@ -24,10 +24,6 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Coturn", - "fr": "Choisissez un nom de domaine pour Coturn" - }, "example": "turn.example.com" } ] From bb35bfd12d2024ea1ca4afb7df9c200868970237 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 3 Apr 2021 18:13:56 +0200 Subject: [PATCH 06/11] Fix badges --- README.md | 4 ++-- README_fr.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6363e5c..4771b0e 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,8 @@ TURN password: #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/coturn%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/coturn/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/coturn%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/coturn/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/coturn.svg)](https://ci-apps.yunohost.org/ci/apps/coturn/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/coturn.svg)](https://ci-apps-arm.yunohost.org/ci/apps/coturn/) ## Limitations diff --git a/README_fr.md b/README_fr.md index fad4a6e..f3c1cdd 100644 --- a/README_fr.md +++ b/README_fr.md @@ -37,8 +37,8 @@ TURN password: #### Architectures supportées -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/coturn%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/coturn/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/coturn%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/coturn/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/coturn.svg)](https://ci-apps.yunohost.org/ci/apps/coturn/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/coturn.svg)](https://ci-apps-arm.yunohost.org/ci/apps/coturn/) ## Limitations From d85d9331f3a2ee81409c89f5876ea74302e57dd6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 19 Apr 2021 10:57:43 +0200 Subject: [PATCH 07/11] Cleaning up --- conf/turnserver.conf | 8 ++++---- scripts/install | 20 +++++--------------- scripts/upgrade | 18 +++--------------- 3 files changed, 12 insertions(+), 34 deletions(-) diff --git a/conf/turnserver.conf b/conf/turnserver.conf index dfc2609..991bce2 100644 --- a/conf/turnserver.conf +++ b/conf/turnserver.conf @@ -27,7 +27,7 @@ # TLS version 1.0, 1.1 and 1.2. # For secure UDP connections, Coturn supports DTLS version 1. # -tls-listening-port=__TLS_PORT__ +tls-listening-port=__TURNSERVER_TLS_PORT__ # Alternative listening port for UDP and TCP listeners; # default (or zero) value means "listening port plus one". @@ -43,7 +43,7 @@ tls-listening-port=__TLS_PORT__ # Alternative listening port for TLS and DTLS protocols. # Default (or zero) value means "TLS listening port plus one". # -alt-tls-listening-port=__TLS_ALT_PORT__ +alt-tls-listening-port=__TURNSERVER_ALT_TLS_PORT__ # Some network setups will require using a TCP reverse proxy in front # of the STUN server. If the proxy port option is set a single listener @@ -241,7 +241,7 @@ max-port=65535 # in the user database (if present). The database-stored value can be changed on-the-fly # by a separate program, so this is why that mode is considered 'dynamic'. # -static-auth-secret=__TURNPWD__ +static-auth-secret=__TURNSERVER_PWD__ # Server name used for # the oAuth authentication purposes. @@ -297,7 +297,7 @@ userdb=/var/lib/turn/turndb # http://www.postgresql.org/docs/9.2/static/libpq-connect.html#LIBPQ-CONNSTRING # for 9.x and newer connection string formats. # -#psql-userdb="host= dbname=__DB_NAME__ user=__DB_USER__ password=__DB_PASSWORD__ connect_timeout=30" +#psql-userdb="host= dbname= user= password= connect_timeout=30" # MySQL database connection string in the case that you are using MySQL # as the user database. diff --git a/scripts/install b/scripts/install index 1926f0b..f6c1d9d 100644 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ app=$YNH_APP_INSTANCE_NAME ynh_script_progression --message="Storing installation settings..." --weight=4 ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=no_sso --value true +ynh_app_setting_set --app=$app --key=no_sso --value=true #================================================= # CREATE A DH FILE @@ -113,18 +113,9 @@ turnserver_pwd=$(ynh_string_random --length=30) ynh_app_setting_set --app=$app --key=turnserver_pwd --value=$turnserver_pwd ynh_print_ON -mv /etc/turnserver.conf /etc/turnserver.conf.orig - coturn_config_path="/etc/turnserver.conf" -cp ../conf/turnserver.conf "$coturn_config_path" -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$coturn_config_path" -ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$coturn_config_path" -ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$coturn_config_path" -ynh_replace_string --match_string=__TLS_ALT_PORT__ --replace_string=$turnserver_alt_tls_port --target_file="$coturn_config_path" -ynh_replace_string --match_string=__CLI_PORT__ --replace_string=$cli_port --target_file="$coturn_config_path" -ynh_print_OFF -ynh_replace_string --match_string=__TURNPWD__ --replace_string=$turnserver_pwd --target_file="$coturn_config_path" -ynh_print_ON + +ynh_add_config --template="/etc/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 @@ -154,8 +145,7 @@ chmod +x $data_path/Coturn_config_rotate.sh # SET COTURN CRON #================================================= -cp -f ../conf/cron_coturn /etc/cron.d/$app -ynh_replace_string --match_string="__DATA_PATH__" --replace_string=$data_path --target_file=/etc/cron.d/$app +ynh_add_config --template="../conf/cron_coturn" --destination="/etc/cron.d/$app" #================================================= # SETUP LOGROTATE @@ -181,7 +171,7 @@ setfacl -R -m user:turnserver:rwX /var/log/$app #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 -yunohost service add $app --description="Coturn TURN server" --log="/var/log/$app/$app.log" --needs_exposed_ports $turnserver_tls_port +yunohost service add $app --description="Coturn TURN server" --log="/var/log/$app/$app.log" --needs_exposed_ports="$turnserver_tls_port" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 1696e74..9f08bc1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -89,18 +89,7 @@ ynh_script_progression --message="Configuring Coturn..." --weight=2 coturn_config_path="/etc/turnserver.conf" -ynh_backup_if_checksum_is_different --file="$coturn_config_path" - -cp ../conf/turnserver.conf "$coturn_config_path" - -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$coturn_config_path" -ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$coturn_config_path" -ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$coturn_config_path" -ynh_replace_string --match_string=__TLS_ALT_PORT__ --replace_string=$turnserver_alt_tls_port --target_file="$coturn_config_path" -ynh_replace_string --match_string=__CLI_PORT__ --replace_string=$cli_port --target_file="$coturn_config_path" -ynh_print_OFF -ynh_replace_string --match_string=__TURNPWD__ --replace_string=$turnserver_pwd --target_file="$coturn_config_path" -ynh_print_ON +ynh_add_config --template="/etc/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 @@ -130,8 +119,7 @@ chmod +x $data_path/Coturn_config_rotate.sh # SET COTURN CRON #================================================= -cp -f ../conf/cron_coturn /etc/cron.d/$app -ynh_replace_string --match_string="__DATA_PATH__" --replace_string=$data_path --target_file=/etc/cron.d/$app +ynh_add_config --template="../conf/cron_coturn" --destination="/etc/cron.d/$app" #================================================= # MIGRATION 3 : USE STANDARD ACCESS FOR CERTIFCATE @@ -169,7 +157,7 @@ setfacl -R -m user:turnserver:rwX /var/log/$app #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 -yunohost service add $app --description="Coturn TURN server" --log="/var/log/$app/$app.log" --needs_exposed_ports $turnserver_tls_port +yunohost service add $app --description="Coturn TURN server" --log="/var/log/$app/$app.log" --needs_exposed_ports="$turnserver_tls_port" #================================================= # START SYSTEMD SERVICE From f23e7fc25f557e5a01929bace649ca9280f56a5a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 26 Apr 2021 18:51:07 +0200 Subject: [PATCH 08/11] Fix links --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4771b0e..d6fedfb 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ *[Lire ce readme en français.](./README_fr.md)* > *This package allows you to install Coturn quickly and simply on a YunoHost server. -If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* +If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* ## Overview TURN and STUN server for VoIP diff --git a/README_fr.md b/README_fr.md index f3c1cdd..74910d3 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,7 +6,7 @@ *[Read this readme in english.](./README.md)* > *Ce package vous permet d'installer Coturn rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* +Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/install) pour apprendre comment l'installer.* ## Overview Serveur TURN et STUN pour VoIP. STUN (Session Traversal Utilities for NAT) et TURN (Traversal Using Relays around NAT) sont des protocoles qui peuvent être utilisés pour fournir une traversée NAT pour VoIP et WebRTC. Ce package fournit un serveur et une passerelle de traversée NAT du trafic multimédia VoIP. From 2474d3efad4044c38af2045c4ca05fe9aaee05be Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 26 Apr 2021 19:28:27 +0200 Subject: [PATCH 09/11] Fix --- scripts/install | 2 +- scripts/remove | 1 - scripts/upgrade | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index f6c1d9d..af36da6 100644 --- a/scripts/install +++ b/scripts/install @@ -115,7 +115,7 @@ ynh_print_ON coturn_config_path="/etc/turnserver.conf" -ynh_add_config --template="/etc/turnserver.conf" --destination="$coturn_config_path" +ynh_add_config --template="../conf/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 diff --git a/scripts/remove b/scripts/remove index b5e86a4..88dd904 100644 --- a/scripts/remove +++ b/scripts/remove @@ -55,7 +55,6 @@ ynh_remove_app_dependencies ynh_script_progression --message="Removing Coturn configuration file..." --weight=2 ynh_secure_remove --file="/etc/turnserver.conf" -mv /etc/turnserver.conf.orig /etc/turnserver.conf #================================================= # REMOVE LOGROTATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 9f08bc1..25fa4b7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -89,7 +89,7 @@ ynh_script_progression --message="Configuring Coturn..." --weight=2 coturn_config_path="/etc/turnserver.conf" -ynh_add_config --template="/etc/turnserver.conf" --destination="$coturn_config_path" +ynh_add_config --template="../conf/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 From 55b40d74bbfc3b346eb84c079f44db381bce7e14 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 26 Apr 2021 19:34:58 +0200 Subject: [PATCH 10/11] Update restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 498f457..8d0dc96 100644 --- a/scripts/restore +++ b/scripts/restore @@ -113,7 +113,7 @@ systemctl enable $app.service --quiet #================================================= 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 $turnserver_tls_port +yunohost service add $app --description="Coturn TURN server" --log="/var/log/$app/$app.log" --needs_exposed_ports="$turnserver_tls_port" #================================================= # OPEN THE PORT From 38f04efa299f8c0cc6022793b96d9db1218c609e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 26 Apr 2021 23:57:56 +0200 Subject: [PATCH 11/11] Update check_process --- check_process | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 9d6bc92..b8aeb8d 100644 --- a/check_process +++ b/check_process @@ -14,6 +14,7 @@ setup_private=0 setup_public=0 upgrade=1 + upgrade=1 from_commit=2b6e951ded8c7d3dc0ad87aa8160ab64af976f68 backup_restore=1 multi_instance=0 port_already_use=0 @@ -22,6 +23,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. + ; commit=2b6e951ded8c7d3dc0ad87aa8160ab64af976f68 + name=Make curl silent manifest_arg=domain=DOMAIN&