We only have to inatilize the pin with the correct state.  That will turn the relay on or off correctly.