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

[fix] Restore data directory

This commit is contained in:
ljf (zamentur) 2020-09-20 18:36:20 +02:00 committed by GitHub
parent db53bc324d
commit a646f7648d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,18 +80,16 @@ chown -R $app:$app $final_path
#=================================================
# SPECIFIC RESTORATION
#=================================================
# CREATE THE DATA DIRECTORY
# RESTORE THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Creating the data directory..."
ynh_script_progression --message="Restoring data directory..." --weight=2
# Define app's data directory
datadir="/home/yunohost.app/${app}/storage"
datadir="/home/yunohost.app/$app/storage"
if [ ! -d "$datadir" ]
then
# Create app folders
mkdir -p "$datadir"
fi
# 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
mkdir -p "$datadir"
# Give permission to the datadir
chown -R "$app":"$app" "$datadir"