mirror of
https://github.com/YunoHost-Apps/lychee_ynh.git
synced 2024-09-03 19:36:36 +02:00
Update restore
This commit is contained in:
parent
d46e02198b
commit
35055d1adb
1 changed files with 10 additions and 9 deletions
|
@ -48,6 +48,14 @@ test ! -d $final_path \
|
|||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
@ -60,23 +68,16 @@ chmod 750 "$final_path/bootstrap/cache"
|
|||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# RESTORE DATA
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring $app data..."
|
||||
ynh_script_progression --message="Restoring 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="$public_path" --not_mandatory
|
||||
|
||||
chmod 755 "$public_path"
|
||||
chmod -R o-rwx "$public_path"
|
||||
chown -R $app:www-data "$public_path"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue