I found that I needed the shutdown command to be run as root.

Also added a note about shutdown_command that bit me.