1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cheky_ynh.git synced 2024-09-03 18:16:00 +02:00

Restore backup before upgrade + cleaning

This commit is contained in:
Gofannon 2019-05-11 00:28:41 +02:00
parent d27beaf0cf
commit 789eeae1bd

View file

@ -54,14 +54,14 @@ fi
#=================================================
ynh_print_info "Backing up the app before upgrading (may take a while)..."
## Backup the current version of the app
#ynh_backup_before_upgrade
#ynh_clean_setup () {
# # restore it if the upgrade fails
# ynh_restore_upgradebackup
#}
## Exit if an error occurs during the execution of the script
#ynh_abort_if_errors
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CHECK THE PATH
@ -107,14 +107,7 @@ ynh_add_fpm_config
#=================================================
# SPECIFIC UPGRADE
#=================================================
# ...
#=================================================
ynh_print_info "Running specific upgrade..."
# Verify the checksum and backup the file if it's different
#ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE"
# Recalculate and store the config file checksum into the app settings
#ynh_store_file_checksum "$final_path/CONFIG_FILE"
# Needed so no manual operation has to be done by user while upgrading
# If missing, Cheky is stuck in an "upgrade" state and the config file