From c5ad3437a982e026847d39f5128039895c1ac0f3 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Thu, 9 Apr 2020 17:59:44 +0200 Subject: [PATCH] try to debug change_url script --- scripts/change_url | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index aeb4087..2ff41a7 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -65,10 +65,14 @@ then path_url="$new_path" # Create a dedicated nginx config ynh_add_nginx_config -if [ "$new_path" == "/" ] +fi + +if [ $change_path -eq 1 ] && [ "$new_path" == "/" ] then ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path';" --target_file="$final_path/config.local.php" -elif +fi + +if [ $change_path -eq 1 ] && [ "$new_path" != "/" ] ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" fi