diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 15571ae..0000000 --- a/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.gitignore - -# From kateproject -.kateproject -.kateproject.d -.directory - -.kate-swp diff --git a/scripts/upgrade b/scripts/upgrade index b73ff7f..00c4344 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,6 +21,17 @@ dbpass=$(ynh_app_setting_get "$app" mysqlpwd) # Stop services systemctl stop monitorix.service +# 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 + # Download package and install it get_install_source