1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/weblate_ynh.git synced 2024-10-01 13:35:04 +02:00

move backup

This commit is contained in:
Jean-Baptiste Holcroft 2019-05-12 17:18:42 +02:00
parent d6a20200f2
commit e89c8d88e9

View file

@ -46,6 +46,19 @@ ynh_secure_remove freeze.pip
previous_version_template="../conf/settings_history/settings.$previous_version.py"
test -e "$previous_version_template" || ynh_die "Previous version unknown: $previous_version"
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
# 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
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
@ -111,23 +124,6 @@ if [ -z "$redis_db" ]; then
ynh_app_setting_set "$app" redis_db "$redis_db"
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
# 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
#=================================================
# ENSURE DOWNWARD COMPATIBILITY - impacting system
#=================================================
# (<2.20) remove complex uwsgi systemd template
if [ -e "/etc/systemd/system/uwsgi-app@.service" ]
then