Script to run before shutdown or reboot

Thank you @dmt,

It’s AKREGATOR and the full problem is mentioned here.

What makes me wonder: Actually my script is only for testing; meanwhile I replaced the echo command by kDialog. I can run it in a konsole and hear the sound, see the kDialogs. I stored it in /usr/lib/systemd/system-shutdown/ and lib/systemd/system-shutdown/ but don’t see / hear anything at shutdown.