1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/collabora_ynh.git synced 2024-09-03 18:16:25 +02:00

Fix backup-restore

This commit is contained in:
Salamandar 2024-01-29 16:43:01 +01:00
parent f09a2a4471
commit 6a18432052
2 changed files with 18 additions and 6 deletions

View file

@ -15,6 +15,12 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================

View file

@ -11,12 +11,16 @@ source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="$install_dir"
### $install_dir will automatically be initialized with some decent
### permissions by default ... however, you may need to recursively reapply
### ownership to all files such as after the ynh_setup_source step
chown -R "$app:www-data" "$install_dir"
#=================================================
# RESTORE CONFIGURATION
@ -29,9 +33,11 @@ chmod 640 "/etc/coolwsd/coolwsd.xml"
chown cool:root -R /etc/coolwsd
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
yunohost service add "coolwsd" --description="Collabora online office suite" --log="/var/log/$app/$app.log"