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 #=================================================