From 50697051e182c3b1f985e0de2b1ad778fec39950 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 24 Sep 2019 17:44:02 +0000 Subject: [PATCH] [fix] change_url Closes #129 --- scripts/change_url | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 9129e0c..390db63 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -100,9 +100,17 @@ fi # ... #================================================= if [ $new_path = "/" ]; then - ynh_replace_string "$old_domain$old_path" "$new_domain" "$final_path/config.php" + if [ $old_path = "/" ]; then + ynh_replace_string "://$old_domain" "://$new_domain" "$final_path/config.php" + else + ynh_replace_string "://$old_domain$old_path" "://$new_domain" "$final_path/config.php" + fi else - ynh_replace_string "$old_domain$old_path" "$new_domain$new_path" "$final_path/config.php" + if [ $old_path = "/" ]; then + ynh_replace_string "://$old_domain" "://$new_domain$new_path" "$final_path/config.php" + else + ynh_replace_string "://$old_domain$old_path" "://$new_domain$new_path" "$final_path/config.php" + fi fi #=================================================