From 27ac10297219595f1816b53515752790aac3c77f Mon Sep 17 00:00:00 2001 From: oleole39 Date: Tue, 7 Feb 2023 04:16:50 +0100 Subject: [PATCH] Fix major typo in restore script --- scripts/install | 3 +++ scripts/restore | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index a732daf..6aba403 100755 --- a/scripts/install +++ b/scripts/install @@ -123,6 +123,9 @@ ynh_add_config --template="../conf/noalyss.conf" --destination="$final_path/incl chmod 650 "$final_path/include/config.inc.php" chown $app: "$final_path/include/config.inc.php" +# Make sure to keep an archive of Noalyss' install.php script in case Noalyss' admin user should be updated in the future since the original one will be deleted at the end of install process (cf. instructions in config.inc.php) +cp "$final_path/html/install.php" "$final_path/html/install.php.archive" + #================================================= # SETUP LOGROTATE #================================================= diff --git a/scripts/restore b/scripts/restore index ef2fcc4..eff3fee 100755 --- a/scripts/restore +++ b/scripts/restore @@ -85,14 +85,12 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= ynh_script_progression --message="Restoring the PostgreSQL database..." -ynh_psql_restore_all_app_dbs_dumps --db_user=$db_user --db_user_pwd=db_user_pwd +ynh_psql_restore_all_app_dbs_dumps --db_user=$db_user --db_user_pwd=$db_user_pwd # Give permission to db_user to create databases, as with version 9025 at least, standard Noalyss operation (can be tweaked with shared server install process - with potentially less features?) will require to create several databases: one admin database (account_repository), one database per accounting template (two are populated at install by default: mod1, mod2, etc.), one per accounting folder that will be created while using the app, etc. if [ -n "$db_user" ]; then sql="ALTER USER $db_user CREATEDB" ynh_psql_execute_as_root --sql="$sql" - sql="ALTER USER noalyss WITH PASSWORD '$db_user_pwd'" #Workaround to restore the backed up password, since as of 23 January 2023, there seems to be a bug in ynh_psql_setup_db() helper (YNH Core) forcing password reset. - ynh_psql_execute_as_root --sql="$sql" fi #=================================================