mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
Handle migration fail, and restore spip2
This commit is contained in:
parent
9838b5913d
commit
33014beb5e
1 changed files with 10 additions and 6 deletions
|
@ -79,6 +79,11 @@ ynh_print_info "Backing up the app before upgrading (may take a while)..."
|
||||||
# Backup the current version of the app
|
# Backup the current version of the app
|
||||||
ynh_backup_before_upgrade
|
ynh_backup_before_upgrade
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
|
if [ $migration_process -eq 1 ]; then
|
||||||
|
yunohost app remove $app
|
||||||
|
# Reload some values changed by the migration process
|
||||||
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
fi
|
||||||
# restore it if the upgrade fails
|
# restore it if the upgrade fails
|
||||||
ynh_restore_upgradebackup
|
ynh_restore_upgradebackup
|
||||||
}
|
}
|
||||||
|
@ -90,8 +95,7 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_handle_app_migration "spip2" "spip2_migration"
|
ynh_handle_app_migration "spip2" "spip2_migration"
|
||||||
if [ $migration_process -eq 1 ]
|
if [ $migration_process -eq 1 ]; then
|
||||||
then
|
|
||||||
# If a migration has been perform
|
# If a migration has been perform
|
||||||
# Reload some values changed by the migration process
|
# Reload some values changed by the migration process
|
||||||
final_path=$(ynh_app_setting_get $app final_path)
|
final_path=$(ynh_app_setting_get $app final_path)
|
||||||
|
|
Loading…
Reference in a new issue