If someone could point me in the right direction of creating a add-on I'm more than happy to spend some time on this.
Previously I used other scripts but I had problems with both in the end, one being after a period of time it wouldn't reset or Shutdown and I would have to pull the plug and the other script I found the red led would always flash instead of staying on.
So in the end I sat down did my research and created my own script.
I wrote a script to work with gpio zero, installing raspberry pi tools from the LibreELEC repo will enable gpio zero.
After that I copied of my scripts and created a autostart.sh file in the .config folder and everything works perfect.
My script also sends the correct commands to shut down libreelec correctly "kodi-send --action"shutdown"
This shuts down the exact same way it would if you select power off from the power menu of Kodi.
I don't feel "shutdown -h now was doing the job properly as it shutdown almost instantly making me feel metadata etc wasn't being saved.
So if I could create a add-on that had the raspberry pi tools as a dependency and then installed my scripts that would be perfect.
The problem is I wouldn't know where to start with this lol