1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/my-mind_ynh.git synced 2024-09-03 19:46:22 +02:00

Added check_process and ynh_abort_if_errors in upgrade script

This commit is contained in:
anmol 2018-11-08 00:18:49 +05:30
parent a301ac0117
commit 986c6f2e92
2 changed files with 14 additions and 2 deletions

View file

@ -25,8 +25,8 @@
Level 1=auto
Level 2=auto
Level 3=auto
# Level 4:
Level 4=0
# Level 4: #App do not require Ldap support as there is no login
Level 4=na
# Level 5:
Level 5=auto
Level 6=auto

View file

@ -43,6 +43,18 @@ if [ -z $final_path ]; then
ynh_app_setting_set $app final_path $final_path
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
#=================================================