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:
parent
a76a6f5654
commit
1a0a51caab
2 changed files with 11 additions and 8 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -1,8 +0,0 @@
|
|||
.gitignore
|
||||
|
||||
# From kateproject
|
||||
.kateproject
|
||||
.kateproject.d
|
||||
.directory
|
||||
|
||||
.kate-swp
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue