shutdown action

Hi,
I tried to use this plugin, and was confused because the shutdown action didn't do anything, and gave no error message either. So I implemented something that seems to work for me.

The list of shutdown actions was not being populated at all, so I just added some code to do so. It's probably not the "right" way to do this, but I thought since it does something rather than nothing it might be worth sharing with you.