Momentary Push Button RPi3

  • Hi,

    I'm planning to add Momentary Tact Push Button Switch to my RPi3. Will the below work? This site I found was kind of old but was wonder if the code and kodi setup is the same for LibreElec. The author used OpenElec, HowTo: Raspberry Pi OpenElec Power Wake and Shutdown Button using GPIO – barryhubbard.com

    Code
    nano /storage/.config/autostart.sh
    add this line:
    
    python /storage/scripts/shutdown.py &