Hello forum,
I would like to run a custom BASH script as the user chooses to power-down Kodi via the GUI.
The script uses variable assignment, the date fuction, netcat and a while/do loop.
I know cron cannot be used for running scripts at/before shutdown.
I'm running Kodi 19.3 Matrix on a 4GB RPi with LibreELEC 10.0.1.
Thanks for your time.
Best regards,
Rembrandt
PS: EDIT 1 this does not work - tested
Would I be able to start a BASH script via cron @reboot that checks ps aux | grep kodi
for the likes of :
1067 root 0:00 {kodi.sh} /bin/sh /usr/lib/kodi/kodi.sh --standalone -fs
1081 root 7:59 /usr/lib/kodi/kodi.bin --standalone -fs
and if these, or one of them disappear, assume that Kodi is going down?
Thanks.