diff --git a/scripts/backup b/scripts/backup index 637142e..59b1d7d 100644 --- a/scripts/backup +++ b/scripts/backup @@ -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 #================================================= diff --git a/scripts/restore b/scripts/restore index a03a214..8151baf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -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"