Update on this script thing.It works when i reboot the machine but not on a shutdown. I have no idea why.
The broken shutdown is still there.
Try this to determinate what you need to set as the case when you initiate the shutdown (pressing the power off system button)
If it's empty the shutdown.sh was probably never executed.