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

Add backup before upgrade

This commit is contained in:
Josué Tille 2018-01-13 21:31:48 +01:00
parent a76a6f5654
commit 1a0a51caab
2 changed files with 11 additions and 8 deletions

8
.gitignore vendored
View file

@ -1,8 +0,0 @@
.gitignore
# From kateproject
.kateproject
.kateproject.d
.directory
.kate-swp

View file

@ -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