This paper mainly investigates a preventive replacement policy for a system subject to both a deteriorating process and a shock process. Firstly, the stochastic deterioration is modelled with a general degradation path model, and the arrival numbers of external shocks are described with a non-homogeneous Poisson process (NHPP). The two processes are mutually dependent and the shock process itself has two distinct effectiveness including a minor one and a major one. Afterwards, system reliability function is constructed analytically. Finally, a bivariate preventive maintenance policy is put forward. The average maintenance cost rate is formulated and optimised for two special cases, respectively. To demonstrate the effectiveness of the proposed model, a sliding spool in a realistic hydraulic control system is studied. [Submitted: 14 October 2021; Accepted: 2 January 2022]