YunoHost-Apps / mautrix_signal_ynh

Matrix signal package for YunoHost
GNU Affero General Public License v3.0
4 stars 10 forks source link

Fix database password handling during upgrade #67

Open MayeulC opened 2 years ago

MayeulC commented 2 years ago

Describe the bug

Some users end up with an empty password in their bridge config file (under database:) after upgrade.

Workaround

Extract psqlpwd from /etc/yunohost/apps/mautrix_signal/settings.yml and put it in /opt/yunohost/mautrix_signal/config.yaml on line:

database: postgres://mautrix_signal:xxxxxxxxx@localhost:5432

Context

Seems like the ynh config iterated over multiple variable names:

Currently, the handling during migration is a bit of a mess. This should be fixed, and the ynh db cleaned up.

Same for mautrix_bridge_db_name.

Also, it looks like mautrix_version is not kept up-to-date.

MayeulC commented 2 years ago

It might be worth it to look into upgrading to the new manifest: https://github.com/YunoHost/doc/blob/resources-doc/pages/06.contribute/10.packaging_apps/14.advanced/03.packaging_v2/packaging_v2.md