1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pleroma_ynh.git synced 2024-09-03 20:15:59 +02:00

Merge pull request #167 from YunoHost-Apps/testing

Fix datadir restore
This commit is contained in:
yalh76 2021-04-07 17:07:09 +02:00 committed by GitHub
commit d31780067c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 7 deletions

View file

@ -51,10 +51,12 @@
upgrade=1 from_commit=059ddc457aabe6962f5960612ed2dc1db53daeeb
# 2.2.2~ynh1
upgrade=1 from_commit=63723f18af5b035a41e967078cc3128423b1f9ae
# 2.3.0~ynh1
upgrade=1 from_commit=9f5c0970d2bf8bb6111785184b1d3762228b04ec
backup_restore=1
multi_instance=0
port_already_use=0
change_url=0
change_url=1
;;; Options
Email=anmol@datamol.org;yalh@yahoo.com
Notification=yes
@ -89,3 +91,5 @@ Notification=yes
name=2.2.0~ynh1
; commit=63723f18af5b035a41e967078cc3128423b1f9ae
name=2.2.2~ynh1
; commit=9f5c0970d2bf8bb6111785184b1d3762228b04ec
name=2.3.0~ynh1

View file

@ -6,7 +6,7 @@
"en": "A free, federated social networking server built on open protocols.",
"fr": "Un serveur de réseautage social fédéré et gratuit basé sur des protocoles ouverts."
},
"version": "2.3.0~ynh1",
"version": "2.3.0~ynh2",
"url": "https://git.pleroma.social/pleroma/pleroma",
"license": "AGPL-3.0-only",
"maintainer": [

View file

@ -106,9 +106,6 @@ ynh_script_progression --message="Removing directories..."
# Remove the config directory securely
ynh_secure_remove --file="/etc/$app"
# Remove the data directory securely
ynh_secure_remove --file="$datadir"
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -91,6 +91,9 @@ chown -R "$app":"$app" "$final_path"
#=================================================
ynh_script_progression --message="Recreating the data directory..."
# Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup.
ynh_restore_file --origin_path="$datadir" --not_mandatory
# Create app folders
mkdir -p "$datadir/"
mkdir -p "$datadir/uploads/"
@ -100,8 +103,6 @@ mkdir -p "$datadir/static/emoji/"
# Give permission to the datadir
chown -R "$app":"$app" "$datadir"
ynh_app_setting_set --app=$app --key=datadir --value="$datadir"
#=================================================
# RESTORE THE CONFIG FILE
#=================================================