Open the door always away from player

Hello,
im looking for solution to open the door always awas from player.
At the moment my door is working with one Box Collision. Press ‘F’ the door is open - alway into one way.

As far as I know, I have to use two boxes, one on each side.

My question is, how to get the player position, in witch box he is, or maybe there are an other, easier, solution how to do this.

Thank you!