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