I'd like to implement an electronic circuit to be able to restart my raspberry Pi when it has been shutdown (without plugging in and out the USB charger, which will obviously remain plugged all the time). For this, I just need to use the P6 pins, as described here (https://raspberrypi.stackexchange.com/a/59719/11224) and here (https://raspberrypi.stackexchange.com/a/19557/11224).
However, I surely don't want to accidentally shortcut the P6 pins while my Raspberry is running, because it will trigger a RESET signal, and I know for sure it could damage the SD card.
Thus, I want to be able to determine if the Raspberry is running or not. I've just tested mine : when it's powered then shutdown'ed, every GPIO is still powered with 3.3V/5V voltage as usual.
The only way I could think of is using a GPIO output that I would programmatically set to 1 (5V) while the raspberry is running, but this solution has a major drawback : the GPIO output won't be available until the raspberry has fully completed its boot (about 1 minute), so I still have the risk that an accidental RESET is done at this moment.
Is there another way to achieve that ?