From b7e6a352a19c3f47f657358c8f7d0f79cb37d9d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Wed, 17 Apr 2024 08:44:41 +0200 Subject: [PATCH] Move turn server password definition in same place than other definition --- scripts/_common.sh | 5 +++++ scripts/install | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1c22c97..24ce3ae 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -102,6 +102,11 @@ ensure_vars_set() { ynh_app_setting_set --app="$app" --key=e2e_enabled_by_default --value="$e2e_enabled_by_default" fi + if [ -z "${turnserver_pwd:-}" ]; then + turnserver_pwd=$(ynh_string_random --length=30) + ynh_app_setting_set --app="$app" --key=turnserver_pwd --value="$turnserver_pwd" + fi + if [ -z "${web_client_location:-}" ] then web_client_location="https://matrix.to/" diff --git a/scripts/install b/scripts/install index 530964c..9d7f46a 100644 --- a/scripts/install +++ b/scripts/install @@ -156,9 +156,6 @@ configure_nginx #================================================= ynh_script_progression --message="Configuring Synapse..." --weight=2 -# Find password for turnserver and database -turnserver_pwd=$(ynh_string_random --length=30) -ynh_app_setting_set --app=$app --key=turnserver_pwd --value=$turnserver_pwd ynh_add_jinja_config --template="homeserver.yaml" --destination="/etc/matrix-$app/homeserver.yaml" ynh_add_config --template="log.yaml" --destination="/etc/matrix-$app/log.yaml"