Initialy I was thinking the hard way:
Use a reed switch activated with a magnet and connected to the expansion port and implementing proper service in Debian to handle the full thing…sometimes is better to understand what do you want vs thinking in technology.
Might another solution just to have it auto-sleep after a period of idle time?
Or, as mentioned, use the GPIO, but have a simple Python script running (as a service) to check when it’s activated… I’d probably be lazy and have a momentary switch mounted on the outside, although a reed switch would be neater (albeit less flexible re alternative uses).