Consider a tensor field $h_{\mu \nu}(t,\vec{x})$ which obeys the wave equation, given by (in units where $c = G = 1$):
$$ \Box h_{\mu \nu} = a \text{ } \bar{T}_{\mu \nu} \tag{1}$$ where $a$ is some constant. The solution to this can be given by: $$h_{\mu \nu} = b\int d^3x^{\prime} \frac{\bar{T}_{\mu \nu}(\vec{x^{\prime}},t_R )}{|{\vec{x} - \vec{x}^{\prime}}|} \tag{2}$$
where the retarded time $t_R = t - |\vec{x} - \vec{x}^{\prime}|$ and $b$ is some other constant. Here, Greek indices run over 4 indices $\mu = 0,1,2,3$ with 0 referring to the 'time coordinate.' But I have marked spatial 3-vectors using an arrow. My question is the following.
If I consider Minkowski background, I am able to show (by simply operating the $\Box = \partial_t^2 - \nabla^2$ on $h_{\mu \nu}$) that (2) solves (1). However, I want to solve (1) in some curved background. My confusion is that I do not know how the PDE (1) can differentiate between flat background in curvilinear coordinates, and true curvature via a curved background. Further, I can expand the operator $$\Box = \frac{1}{\sqrt{-g}}\partial_{\mu}\left(\sqrt{-g}g^{\mu \nu} \partial_\nu\right)$$ for both flat space (in any coordinates) and curved space. So I am not sure how to modify (2) in order to obtain a solution for (1) in a curved background.
EDIT: For some context, this is the motivation behind this question. I want to consider linearized gravity around curved space time. So my full metric $\bar{g}_{\mu \nu} = g_{\mu \nu} + h_{\mu \nu}$. Normally one takes $g_{\mu \nu} = \eta_{\mu \nu}$. In this case, the wave equation (1) is obtained using the Fierz Pauli action (equation 5.8 here, for example). But if I start with a curved $g_{\mu \nu}$ my plan to obtain the wave equation is to modify the FP action via minimal coupling, change the partial derivatives to covariant derivatives, and I find that I still obtain an equation of the same form as (1) but now the $\Box$ contains information about the background geometry. How would I use the solution in (2) to to construct a solution for (1) in the curved space case?