Having got a Python script to turn the PI off via a push button I'd like to run this script when the Pi boots. The script works if I run it from the console. I've tried the following taken from a previous post that was wanting to do something similar with the ATXraspi switch.
[Unit]
Description=Startup PiSupply
After=systemd-modules-load.service
[Service]
Type=simple
ExecStart=/home/pi/PiSupply/ButtonPress.py
[Install]
WantedBy=multi-user.target
I've invoked the service using
systemctl enable PiSupply
but it doesn't run when the Pi boots up.
Do I need to initiate it diferently for a Python script?