mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
helpers: Don't say the 'app was restored' when restore failed after failed upgrade
This commit is contained in:
parent
36117a6297
commit
019d207c2f
1 changed files with 6 additions and 1 deletions
|
@ -479,7 +479,12 @@ ynh_restore_upgradebackup() {
|
|||
yunohost app remove $app
|
||||
# Restore the backup
|
||||
yunohost backup restore $app_bck-pre-upgrade$backup_number --apps $app --force --debug
|
||||
ynh_die --message="The app was restored to the way it was before the failed upgrade."
|
||||
if [[ -d /etc/yunohost/apps/$app ]]
|
||||
then
|
||||
ynh_die --message="The app was restored to the way it was before the failed upgrade."
|
||||
elif
|
||||
ynh_die --message="Uhoh ... Yunohost failed to restore the app to the way it was before the failed upgrade :|"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
ynh_print_warn --message="\$NO_BACKUP_UPGRADE is set, that means there's no backup to restore. You have to fix this upgrade by yourself !"
|
||||
|
|
Loading…
Add table
Reference in a new issue