I have arduino that knows when car is on/off (reads voltage from steering wheel buttons), and after some time sends Raspberry Pi to power off. Relay leaves 60 seconds for Raspberry to shutdown - if it takes more than 60 seconds, Raspberry will lose power without proper shutdown.