From 54024c3b688ad4aa2aa22d40bf26b24dc916148d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 4 Jun 2020 00:54:26 +0200 Subject: [PATCH] Cleanup --- scripts/remove | 2 +- scripts/restore | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/remove b/scripts/remove index 6549fa2..0317ca6 100644 --- a/scripts/remove +++ b/scripts/remove @@ -29,7 +29,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) ynh_script_progression --message="Removing the database..." --weight=1 # Remove a database if it exists, along with the associated user -ynh_psql_remove_db --db_user=$db_user --db_name=$db_name +ynh_psql_remove_db --db_user="$db_user" --db_name="$db_name" #================================================= # REMOVE DEPENDENCIES diff --git a/scripts/restore b/scripts/restore index a706e45..9eecf5f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -31,6 +31,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= @@ -103,10 +104,8 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=2 ynh_psql_test_if_first_run - -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd -ynh_psql_execute_file_as_root ./db.sql "$db_name" +ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name" #================================================= # GENERIC FINALIZATION