mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Add diable backup before upgrade option
This commit is contained in:
parent
d0d93b57b7
commit
78799558c9
2 changed files with 13 additions and 4 deletions
|
@ -87,6 +87,12 @@ This following command will enable the admin access to the specified user :
|
||||||
su --command="psql matrix_synapse" postgres <<< "UPDATE users SET admin = 1 WHERE name = '@user_to_be_admin:domain.tld'"
|
su --command="psql matrix_synapse" postgres <<< "UPDATE users SET admin = 1 WHERE name = '@user_to_be_admin:domain.tld'"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Disable backup in upgrade
|
||||||
|
|
||||||
|
To solve the issue [#30](https://github.com/YunoHost-Apps/synapse_ynh/issues/30) you can disable the upgrade in the upgrade by setting to true the key `disable_backup_before_upgrade` in the app setting. You can set it by this command :
|
||||||
|
|
||||||
|
`yunohost app setting synapse disable_backup_before_upgrade -v 1`
|
||||||
|
|
||||||
Migration from old package
|
Migration from old package
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,13 @@ fi
|
||||||
|
|
||||||
systemctl stop matrix-synapse.service
|
systemctl stop matrix-synapse.service
|
||||||
|
|
||||||
|
if [[ $(ynh_app_setting_get $app disable_backup_before_upgrade) != '1' ]]
|
||||||
|
then
|
||||||
ynh_backup_before_upgrade
|
ynh_backup_before_upgrade
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
ynh_restore_upgradebackup
|
ynh_restore_upgradebackup
|
||||||
}
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue