diff --git a/hooks/post_app_upgrade b/hooks/post_app_upgrade index 1d1a455..dff8796 100644 --- a/hooks/post_app_upgrade +++ b/hooks/post_app_upgrade @@ -15,6 +15,12 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME final_path=/var/www/$app +#================================================= +# backup the bdd +#================================================= +sudo cp /tmp/association.sqlite $final_path/association.sqlite + + #================================================= # Change options in file config.dist.php # and copy in config.local.php diff --git a/scripts/upgrade b/scripts/upgrade index 86f235b..e1d5e9c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -110,6 +110,13 @@ then ynh_setup_source --dest_dir="$final_path" fi +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --time --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #================================================= @@ -118,12 +125,6 @@ ynh_script_progression --message="Upgrading nginx web server configuration..." - # Create a dedicated nginx config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --time --weight=1 - -ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE DEDICATED USER @@ -133,12 +134,6 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app -#================================================= -# SPECIFIC UPGRADE -#================================================= -sudo cp /tmp/association.sqlite $final_path/association.sqlite -#================================================= - #================================================= # STORE THE CONFIG FILE CHECKSUM #=================================================