Ouvrir /boot/config.txt et ajouter à la fin du fichier la ligne suivante :
dtoverlay=gpio-shutdown,gpio_pin=3
Redémarrer :
sudo reboot
Connecter le bouton poussoir sur les pins 3 et 7
Tout est dit sur ce tuto: https://www.stderr.nl/Blog/Hardware/RaspberryPi/PowerButton.html
tuto - fr - Bouton marche arrêt et refroidissement automatique - opendomotech.com
forum - en - On/Off with 5 & 6 pin - raspberrypi.org
tuto - en Raspberry pi shutdown restart button - hackster.io