Callback on Shutdown

Hey!

Im looking for a way to execute cleanup code before a rails instance
is shutdown. Is there some kind of callback i can hook into? Something
like on_shutdown...? I tried to search the web, but everything i found
relates to the active record callbacks, which are not helpful in this
case.

Thanks a lot!

Florian