`beforeExit` in Meteor

I want to do something before my server shuts down. I tried this:

process.on('beforeExit', function () {
  console.log("look, I'm exiting")
});

This doesn’t appear to work. Any suggestions?

Why would you want that? Can’t do it on startup?