How to run a script from remote or button combo

  • I'm interested in running a script 'outside of Kodi' on an S905 box I have running LibreElec. I'm running Retroarch in conjunction with Kodi on this box and use a launcher script to exit Kodi then launch the game in Retroarch. Rarely there's a game that doesn't work when launched and the box essentially just hangs. I'm able to ssh into the box and reboot it, or restart Kodi, but I'm interested in doing this from either the remote or from a controller connected via bluetooth.

    Does LibreElec already have something included that would allow this? Any help would be appreciated.