I installed LibreElec on my RPi3 and it works. I have also installed LIRC for remote controller, it works. I have a NAS (Network attached storage) on the same network. It wakes up with wol packets, so I wrote a script, it sends a wol packets every 3 minutes. The script runs on another linux machine. Now I want to copy this script to RPi and run it if I press a button on remote controller. I dont want to run script at start-up to avoid to start the NAS at every boot, I want to start the NAS only when needed.
How can I do that? How can I "map" a button to a script?