External shutdown button with RasperryPi 5

My AllStarLink node is tucked away in a pelican case with my radio and router in the back of my car so I’d like to add a switch on the outside that can safe-shutdown the Pi before I pull the power cord.

Luckily I’m using a RasperryPi 5 which has a power button and even pins to add an external/remote button.

Is using the power button on the RasperryPi 5 a good way to shut down the node, specifically Asterisk? Or should I use one of the GPIO pins with a specific shutdown script?

an orderly shutdown is generally a more desirable method than just yanking the DC power

the raspi5 has a button which is polled by the firmware which signals the watchdog timer (WDT)

just letting the firmware do its thing won't get you a fully orderly shutdown, though, i think. it is possible to intercept the shutdown signal, run script(s) or sudo systemctl poweroff, and then let the firmware do the rest, as best i can ascertain

As long as whatever you rig up ends up calling a proper, orderly shutdown Asterisk/app_rpt will be just fine.

Nice hack for powering off Pi’s… TechNote: Shutdown an ASL3 Node with Three Key-Ups – EtherHam