A basic python script that lets you use physical buttons for power and restart with an LED indicator.
It was built and tested on a Raspberry Pi 3B+.
To run this script at startup, add the following line to the end of your crontab by running crontab -e:
crontab -e
@reboot python /home/pi/controller.py &