A better discussion is at http://askubuntu.com/questions/78298...ocess-takes-lo
Upstart jobs for shutdown are governed by: http://upstart.ubuntu.com/cookbook/#id134
I would do it in Upstart. Something like:
When you tell the system to shutdown (runlevel 0), Upstart will check the list of jobs that need to be started or stopped for that condition before actually executing the instruction. This job tells upstart to run the script before the change is executed.
# Upstart job: /etc/init/my_shutdown_job.conf
description "My shutdown job"
start on runlevel 
Caveat: I have done a bunch of Upstart jobs, but have not tested this particular one.