Got it working finally. Here is a short description what I did (maybe this helps other people who want to execute shell commands with Lirc - even if my approach is a little bit hacky ;-)):
- enable Lirc in Kodi
- add to /storage/.config/autostart.sh:
/usr/bin/irexec -d /storage/.config/lircrc &
- create /storage/.config/lircrc and add your commands - e.g.:
Be careful: If you are used to define your own Lirc-keys here - this won't work. Use one of the predefined Lirc-key names which you do not need otherwise. See for example xbmc/Lircmap.xml at master · xbmc/xbmc · GitHub for a (maybe not complete) list of possible Lirc-keys.
- make sure Kodi doesn't react on (for example) the KEY_HOME key - create /storage/.kodi/userdata/Lircmap.xml: