From 186abba6ff1ca649f86f36e4a8fe6775a6fec2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 31 Aug 2023 13:28:12 +0200 Subject: [PATCH] Update restore --- scripts/restore | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/scripts/restore b/scripts/restore index 6c9b1c6..0a054b3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -20,12 +20,11 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# REINSTALL DEPENDENCIES +# RESTORE THE MYSQL DATABASE #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=1 +ynh_script_progression --message="Restoring the MySQL database..." --weight=3 -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= # RESTORE THE PHP-FPM CONFIGURATION @@ -36,13 +35,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE MYSQL DATABASE -#================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=3 - -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql - #================================================= # GENERIC FINALIZATION #=================================================