Hi Frank,
You are perfectly right!
Shutting down via the UI is immediate. And using the command /srv/http/command/rune_shutdown just before the poweroff is also immediate. I had a look inside the rune_shutdown script and it appears that RuneAudio does some stuff before shutting down. So I have to do the same.
But as I'am a little bit lazy I have created two aliases to poweroff my Pi properly via the console:
alias poweroff="/srv/http/command/rune_shutdown && poweroff"
alias reboot="/srv/http/command/rune_shutdown && reboot"
To make them persistent after reboot, add those 2 lines into /root/.profile (and not .bashrc as I expected!).
Thank you very much Frank for these relevant advice.
Matock