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 1/2] 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" From 77aca763d65d97028ffc297a2282d2704ba53c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathana=C3=ABl?= <7300309+nathanael-h@users.noreply.github.com> Date: Wed, 17 Apr 2024 15:41:08 +0200 Subject: [PATCH 2/2] chg: fix user in update_synapse_for_appservice.sh Since the migration to the packaging v2 in https://github.com/YunoHost-Apps/synapse_ynh/pull/426 the system user for this app is $app and not matrix-$app anymore. --- sources/update_synapse_for_appservice.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/update_synapse_for_appservice.sh b/sources/update_synapse_for_appservice.sh index bf6979c..5abacfe 100644 --- a/sources/update_synapse_for_appservice.sh +++ b/sources/update_synapse_for_appservice.sh @@ -18,8 +18,8 @@ for f in $(ls /etc/matrix-$app/app-service/); do done # Set permissions -chown matrix-$app $service_config_file -chown matrix-$app /etc/matrix-$app/app-service/* +chown $app $service_config_file +chown $app /etc/matrix-$app/app-service/* chmod 600 $service_config_file chmod 600 /etc/matrix-$app/app-service/*