2021-03-19 19:47:11 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
|
|
|
source ../settings/scripts/_common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD RESTORATION STEPS
|
|
|
|
#=================================================
|
|
|
|
# RESTORE THE APP MAIN DIR
|
|
|
|
#=================================================
|
2022-03-24 21:01:11 +01:00
|
|
|
ynh_script_progression --message="Restoring the app main directory..."
|
2021-03-19 19:47:11 +01:00
|
|
|
|
2023-11-25 15:13:16 +01:00
|
|
|
ynh_restore_file --origin_path="$install_dir"
|
2021-03-19 19:47:11 +01:00
|
|
|
|
2023-11-25 15:13:16 +01:00
|
|
|
chmod -R o-rwx "$install_dir"
|
|
|
|
chown -R $app_id:www-data "$install_dir"
|
2023-11-25 15:16:41 +01:00
|
|
|
|
2021-03-19 19:47:11 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2022-03-24 21:01:11 +01:00
|
|
|
ynh_script_progression --message="Restoration completed for $app"
|