I would like to use a custom shutdown.sh script. If I execute it from the terminal it does work, but it is not called by LibreELEC when selecting Shutdown in Kodi or poweroff in the terminal.
I just put it under /storage/.config/shutdown.sh and made it executable with chmod.
Do I have to register the script somewhere?
Never mind, the problem turned out to be missing network connectivity, which is explained here.