Ok, its all about shutting down the nas.
I use some nas for movie storage, which I turn on right before watching movies. When I'm finish watching movies I'd like to shutdown nas. Actually I use script-launcher addin for that purpose.
The drawback is, that reason is ugly and its an additional step at shutdown process. I have to enable addin-category at media-main-menue and of cause my memory is far from reliable and so often I forget to execute the script and then have to poweroff the nas without shutting it down.
I don't know whether just powering the box off could cause any harm ...
In any case I don't like that praxis.
Recently I read about shutdown-script in LE-wiki and thought, if I could change point of execution to before network shuts down, I could add the nas-shutdown to that script.
That leaded to several tests. First I had to realize, that I can't change content of service-scripts.
So I checked out LE-sources and started to build my own image.
On that image I changed kodi-poweroff.service and kodi-halt.service and added a "requires=network-online.target" and enable both services by using systemctl enable ... - but I could not see any change. nas did not shutdown on shutting down kodi.
So I added a "touch [somefile]" to shutdown.sh, but on next start the file has not been created - so I suspect, that shutdown.sh script is not going to be executed.
I also thought about adding an entry to kodi-poweroff-menue. I found the patch-files that changes the menue-handling. Don't know, whether it would be possible, to add a menue entry.
Best would be, to change current shutdown-process, so that I can't forget to shutdown nas.