From 4da512e535db839db65e9001fccb39e47b04c875 Mon Sep 17 00:00:00 2001 From: CodeShakingSheep <19874562+CodeShakingSheep@users.noreply.github.com> Date: Tue, 21 May 2024 23:45:18 -0500 Subject: [PATCH] Update change_url Only alter config file if it exists --- scripts/change_url | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 378bb08..fc21bd7 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -25,16 +25,15 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Reconfiguring Matomo..." --weight=2 -if [[ ! -f "$install_dir/config/config.ini.php" ]]; then +if [[ -f "$install_dir/config/config.ini.php" ]]; then # config.ini.php is only created during the post-install process... # it is therefore not present when the CI tests are carried out... # This condition is only for CI test to go through the upgrade process - ynh_setup_source --dest_dir="$install_dir" + + # See https://matomo.org/faq/how-to-install/faq_18/ + ynh_replace_string --match_string="$old_domain" --replace_string="$new_domain" --target_file="$install_dir/config/config.ini.php" fi -# See https://matomo.org/faq/how-to-install/faq_18/ -ynh_replace_string --match_string="$old_domain" --replace_string="$new_domain" --target_file="$install_dir/config/config.ini.php" - #================================================= # SETUP A CRON #=================================================