12 volt relay help please?

i just purchased a set of electric running boards for my truck. i have to make my own wiring harness. the problem i have is, i need to wire a relay to each running board. i need the relay to power the motor down when the door is opened  and is triggered by the door ajar switch which isnt to hard to do. the hard part is to have the relay reverse polarity so that the motor retracts the running boards when the door is shut and  the signal is lost from the ajar switch

Here, try this. A single DPCO relay.

Motor relay two ways.jpg