mirror of
https://github.com/YunoHost-Apps/radicale_ynh.git
synced 2024-09-03 20:16:14 +02:00
Update upgrade
This commit is contained in:
parent
7711f0a026
commit
33c2c7db32
1 changed files with 17 additions and 17 deletions
|
@ -43,6 +43,20 @@ defaulteventduration=$(ynh_app_setting_get --app=$app --key=defaulteventduration
|
|||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backup the app before upgrading"
|
||||
|
||||
# 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
|
||||
#=================================================
|
||||
|
@ -102,20 +116,6 @@ if [ -z "$overwrite_phpfpm" ]; then
|
|||
ynh_app_setting_set $app overwrite_phpfpm $overwrite_phpfpm
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backup the app before upgrading" --weight=9
|
||||
|
||||
# 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
|
||||
|
||||
#=================================================
|
||||
# Migrate legacy permissions to new system
|
||||
#=================================================
|
||||
|
@ -138,7 +138,7 @@ fi
|
|||
#=================================================
|
||||
# ACTIVATE MAINTENANCE MODE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Activate maintenance mode"
|
||||
ynh_script_progression --message="Activate maintenance mode" --weight=1
|
||||
|
||||
ynh_maintenance_mode_ON
|
||||
|
||||
|
@ -147,7 +147,7 @@ ynh_maintenance_mode_ON
|
|||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrade dependencies"
|
||||
ynh_script_progression --message="Upgrade dependencies" --weight=5
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
|
@ -171,7 +171,7 @@ fi
|
|||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Create a dedicated user"
|
||||
ynh_script_progression --message="Create a dedicated user" --weight=2
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create $app
|
||||
|
|
Loading…
Reference in a new issue