[fix] Fix helper for old apps without backup script (#388)

This commit is contained in:
Maniack Crudelis 2017-11-28 19:58:51 +01:00 committed by Alexandre Aubin
parent b0849cc43d
commit 17ba10ad92

View file

@ -59,6 +59,11 @@ ynh_restore_upgradebackup () {
# ynh_abort_if_errors
#
ynh_backup_before_upgrade () {
if [ ! -e "/etc/yunohost/apps/$app/scripts/backup" ]
then
echo "This app doesn't have any backup script." >&2
return
fi
backup_number=1
old_backup_number=2
app_bck=${app//_/-} # Replace all '_' by '-'