The best way to ensure some script/command running on shutdown is to use upstart which is the default init in CentOS6: