1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gossa_ynh.git synced 2024-09-03 18:36:29 +02:00

Update restore

This commit is contained in:
ericgaspar 2022-05-27 16:47:20 +02:00
parent d85ad9397c
commit d954329432
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -30,6 +30,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
@ -68,6 +69,19 @@ chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod +x "$final_path/gossa"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Restoring the data directory..." --weight=1
ynh_restore_file --origin_path="$datadir" --not_mandatory
mkdir -p $datadir
chmod 750 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
#=================================================
# SPECIFIC RESTORATION
#=================================================