1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/outline_ynh.git synced 2024-09-03 19:56:12 +02:00

Merge pull request #56 from Limezy/fix-backup

This commit is contained in:
Limezy 2022-08-23 07:41:39 +07:00 committed by GitHub
commit a465829f43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 2 deletions

View file

@ -6,7 +6,7 @@
"en": "Wiki and knowledge base for teams",
"fr": "Wiki et base de connaissances pour les équipes"
},
"version": "0.65.2~ynh1",
"version": "0.65.2~ynh2",
"url": "www.getoutline.com",
"upstream": {
"license": "BUSL-1.1",
@ -16,7 +16,7 @@
"userdoc": "https://www.getoutline.com/about",
"code": "https://github.com/outline/outline"
},
"license": "AGPL-3.0-only",
"license": "BUSL-1.1",
"maintainer": {
"name": "Raoul de Limezy"
},

View file

@ -64,11 +64,13 @@ ynh_print_info --message="Declaring files to be backed up..."
# BACKUP MINIO
#=================================================
ynh_secure_remove --file="$mc_path/outlinestorage"
pushd "$mc_path"
ynh_exec_warn_less sudo -u minio mkdir outlinestorage
ynh_exec_warn_less sudo -u minio ./mc mirror --a minio/outlinestorage ./outlinestorage/
popd
ynh_secure_remove --file="$final_path/outlinestorage"
mv "$mc_path/outlinestorage" "$final_path/outlinestorage"
chown -R outline:www-data "$final_path/outlinestorage"

View file

@ -107,6 +107,7 @@ ynh_script_progression --message="Removing Outline MinIO bucket..." --weight=1
pushd "$mc_path"
ynh_exec_warn_less sudo -u minio ./mc rb minio/outlinestorage --force
popd
ynh_secure_remove --file="$mc_path/outlinestorage"
#=================================================
# REMOVE NGINX CONFIGURATION

View file

@ -49,6 +49,10 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1
# Ugly fix for an early mistake - to be removed with next upgrade
ynh_secure_remove --file="$final_path/outlinestorage"
ynh_secure_remove --file="$mc_path/outlinestorage"
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {