From 9b22c04604b1434e1caff761d70df73eb0168f69 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 16 Nov 2020 12:09:03 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 19b98c5..b881790 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,6 +105,16 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config --package="$extra_php_dependencies" +#================================================= +# MODIFY A CONFIG FILE +#================================================= + +cp -a ../conf/database.php $final_path/app/Config/database.php + +ynh_replace_string --match_string="__DBUSER__" --replace_string="$db_name" --target_file="$final_path/app/Config/database.php" +ynh_replace_string --match_string="__DBPWD__" --replace_string="$db_pwd" --target_file="$final_path/app/Config/database.php" +ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$final_path/app/Config/database.php" + #================================================= # MODIFY FIRST.CTP #=================================================