From 9916d3934779bf7ce65f48f2eec5da75434fbe0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 7 Jun 2023 00:16:52 +0200 Subject: [PATCH] fix --- conf/homeserver.yaml | 8 ++++---- manifest.toml | 2 +- scripts/install | 5 ++--- scripts/remove | 1 - scripts/upgrade | 5 ++--- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/conf/homeserver.yaml b/conf/homeserver.yaml index acca51c..b193acf 100644 --- a/conf/homeserver.yaml +++ b/conf/homeserver.yaml @@ -2246,7 +2246,7 @@ password_providers: uid: "uid" mail: "mail" name: "givenName" - bind_dn: "uid=__SYNAPSE_USER_APP__,ou=users,dc=yunohost,dc=org" + bind_dn: "uid=__APP__,ou=users,dc=yunohost,dc=org" bind_password: __SYNAPSE_USER_APP_PWD__ filter: "(&(objectClass=posixAccount)(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))" @@ -2269,7 +2269,7 @@ email: # Username/password for authentication to the SMTP server. By default, no # authentication is attempted. # - smtp_user: __SYNAPSE_USER_APP__ + smtp_user: __APP__ smtp_pass: __SYNAPSE_USER_APP_PWD__ # Uncomment the following to require TLS transport security for SMTP. @@ -2297,12 +2297,12 @@ email: # Note that the placeholder must be written '%(app)s', including the # trailing 's'. # - notif_from: "Your Friendly %(app)s Home Server <__SYNAPSE_USER_APP__@__DOMAIN__>" + notif_from: "Your Friendly %(app)s Home Server <__APP__@__DOMAIN__>" # app_name defines the default value for '%(app)s' in notif_from and email # subjects. It defaults to 'Matrix'. # - app_name: Yunohost Matrix-Synapse + app_name: YunoHost Matrix-Synapse # Uncomment the following to enable sending emails for messages that the user # has missed. Disabled by default. diff --git a/manifest.toml b/manifest.toml index 404865c..74abff0 100644 --- a/manifest.toml +++ b/manifest.toml @@ -74,7 +74,7 @@ ram.runtime = "50M" turnserver_alt_tls.exposed = "Both" cli.default = 5766 - #[resources.system_user] + [resources.system_user] [resources.install_dir] dir = "/opt/yunohost/matrix-__APP__" diff --git a/scripts/install b/scripts/install index 4622ec3..82fc48e 100644 --- a/scripts/install +++ b/scripts/install @@ -88,13 +88,12 @@ fi #================================================= ynh_script_progression --message="Configuring system user..." --weight=3 -ynh_system_user_create --username=$synapse_user --home_dir=$install_dir # The format to create an user account varies depending on the version of YunoHost currently installed. ynh_current_version=$(dpkg-query --showformat='${Version}' --show yunohost) if $(dpkg --compare-versions "$ynh_current_version" ge "11.1"); then - yunohost user create $synapse_user_app -F "Synapse Application" -d $domain -p "$synapse_user_app_pwd" + yunohost user create $app -F "Synapse Application" -d $domain -p "$synapse_user_app_pwd" else - yunohost user create $synapse_user_app -f Synapse -l Application -d $domain -p "$synapse_user_app_pwd" + yunohost user create $app -f Synapse -l Application -d $domain -p "$synapse_user_app_pwd" fi adduser $synapse_user ssl-cert adduser turnserver ssl-cert diff --git a/scripts/remove b/scripts/remove index 706a8ba..ce42455 100755 --- a/scripts/remove +++ b/scripts/remove @@ -66,7 +66,6 @@ ynh_secure_remove --file=/etc/nginx/conf.d/${server_name}.d/${app}_server_name.c # Delete a system user ynh_system_user_delete --username=$synapse_user -yunohost user delete $synapse_user_app #================================================= # END OF SCRIPT diff --git a/scripts/upgrade b/scripts/upgrade index 0abd5a6..e295d28 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,7 +24,6 @@ main_domain=$(yunohost domain list --output-as json | jq -r .main) #================================================= synapse_user="matrix-$app" -synapse_user_app="$app" upstream_version=$(ynh_app_upstream_version) upgrade_type=$(ynh_check_app_version_changed) final_www_path="/var/www/$app" @@ -103,9 +102,9 @@ if [ -z $synapse_user_app_pwd ]; then # The format to create an user account varies depending on the version of YunoHost currently installed. ynh_current_version=$(dpkg-query --showformat='${Version}' --show yunohost) if $(dpkg --compare-versions "$ynh_current_version" ge "11.1"); then - yunohost user create $synapse_user_app -F "Synapse Application" -d $domain -p "$synapse_user_app_pwd" + yunohost user create $app -F "Synapse Application" -d $domain -p "$synapse_user_app_pwd" else - yunohost user create $synapse_user_app -f Synapse -l Application -d $domain -p "$synapse_user_app_pwd" + yunohost user create $app -f Synapse -l Application -d $domain -p "$synapse_user_app_pwd" fi fi