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:
parent
db53bc324d
commit
a646f7648d
1 changed files with 7 additions and 9 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue