Instantly share code, notes, and snippets.
Edit /boot/config.txt and add the following line:
/boot/config.txt
dtoverlay=gpio-shutdown,gpio_pin=3