diff --git a/scripts/change_url b/scripts/change_url index bdbf80c..fb3ac16 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -68,11 +68,11 @@ then fi # change the config.local.conf -if [ $change_path -eq 1 ] && [ "$path_url" == "/" ] +if [ $change_path -eq 1 ] && [ "$new_path" == "/" ] then - ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$path_url';" --target_file="$final_path/config.local.php" + ynh_replace_string --match_string="const WWW_URI = '$old_path';" --replace_string="const WWW_URI = '$new_path';" --target_file="$final_path/config.local.php" else - ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" + 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 # Change the domain for nginx