[enh] --verbose for backup during upgrade

This commit is contained in:
Maniack Crudelis 2018-02-04 19:26:49 +01:00 committed by GitHub
parent 61a60d0f5c
commit 8e92bb8328
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,7 @@ ynh_restore_upgradebackup () {
# Remove the application then restore it # Remove the application then restore it
sudo yunohost app remove $app sudo yunohost app remove $app
# Restore the backup # Restore the backup
sudo yunohost backup restore --ignore-system $app_bck-pre-upgrade$backup_number --apps $app --force sudo yunohost backup restore --ignore-system $app_bck-pre-upgrade$backup_number --apps $app --force --verbose
ynh_die "The app was restored to the way it was before the failed upgrade." ynh_die "The app was restored to the way it was before the failed upgrade."
fi fi
} }
@ -77,7 +77,7 @@ ynh_backup_before_upgrade () {
fi fi
# Create backup # Create backup
sudo yunohost backup create --ignore-system --apps $app --name $app_bck-pre-upgrade$backup_number sudo yunohost backup create --ignore-system --apps $app --name $app_bck-pre-upgrade$backup_number --verbose
if [ "$?" -eq 0 ] if [ "$?" -eq 0 ]
then then
# If the backup succeeded, remove the previous backup # If the backup succeeded, remove the previous backup