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:
parent
d6a20200f2
commit
e89c8d88e9
1 changed files with 13 additions and 17 deletions
|
@ -46,6 +46,19 @@ ynh_secure_remove freeze.pip
|
||||||
previous_version_template="../conf/settings_history/settings.$previous_version.py"
|
previous_version_template="../conf/settings_history/settings.$previous_version.py"
|
||||||
test -e "$previous_version_template" || ynh_die "Previous version unknown: $previous_version"
|
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
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -111,23 +124,6 @@ if [ -z "$redis_db" ]; then
|
||||||
ynh_app_setting_set "$app" redis_db "$redis_db"
|
ynh_app_setting_set "$app" redis_db "$redis_db"
|
||||||
fi
|
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
|
# (<2.20) remove complex uwsgi systemd template
|
||||||
if [ -e "/etc/systemd/system/uwsgi-app@.service" ]
|
if [ -e "/etc/systemd/system/uwsgi-app@.service" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue