mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
yeepy!
This commit is contained in:
parent
3af6cc79e9
commit
5e939bada8
1 changed files with 7 additions and 4 deletions
|
@ -102,27 +102,30 @@ backup_before_upgrade=$(ynh_app_setting_get --app=$app --key=backup_before_upgra
|
|||
if [ -z $backup_before_upgrade ] ; then
|
||||
backup_before_upgrade="true"
|
||||
disable_backup_before_upgrade=$(ynh_app_setting_get --app=$app --key=disable_backup_before_upgrade)
|
||||
if $disable_backup_before_upgrade ; then
|
||||
backup_before_upgrade="false"
|
||||
fi
|
||||
if [ $disable_backup_before_upgrade ] ; then
|
||||
backup_before_upgrade="false"
|
||||
fi
|
||||
ynh_app_setting_set --app=$app --key=backup_before_upgrade --value=$backup_before_upgrade
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30
|
||||
|
||||
# We stop the service before to set ynh_clean_setup
|
||||
ynh_systemd_action --service_name=matrix-$app.service --action=stop
|
||||
|
||||
# Backup the current version of the app
|
||||
if [ $backup_before_upgrade ] ; then
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# Clean installation remainings that are not handled by the remove script.
|
||||
ynh_clean_check_starting
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
else
|
||||
ynh_script_progression --message="NOT Backing up the app before upgrading..." --weight=1
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue