From 04df2b22dcd03a384d4f44b2839c081e4decd531 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 11 Dec 2020 11:56:48 +0100 Subject: [PATCH] Fix --- scripts/install | 5 ----- scripts/upgrade | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index 7856e1e..8115366 100755 --- a/scripts/install +++ b/scripts/install @@ -113,11 +113,6 @@ ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion cp -f ../conf/cron /etc/cron.d/$app -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/config.ini.php" -ynh_replace_string --match_string="__DB_PASSWORD__" --replace_string="$db_pwd" --target_file="../conf/config.ini.php" - -cp -f ../conf/config.ini.php $final_path/config/config.ini.php - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1c2b90a..9f0c0e3 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,16 +83,16 @@ then # Create a temporary directory tmpdir="$(mktemp -d)" # Backup the config file in the temp dir - cp -a "$final_path/config/config.ini.php" "$tmpdir/config.ini.php" + cp -a "$final_path/config" "$tmpdir" # Remove the app directory securely - ynh_secure_remove --file=$final_path + ynh_secure_remove --file="$final_path" # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" #Copy the admin saved settings from tmp directory to final path - cp -a "$tmpdir/config.ini.php" "$final_path/config/config.ini.php" + cp -a "$tmpdir" "$final_path/config" # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir"