> To my knowledge Sinatra doesn't have a shutdown hook, but a solution could
> be to create a sub class app:
I think this is right, but I suggest you use a rackup file rather than
MyApp.run!
This is because you have to do your own command-line parsing to pass
appropriate options to MyApp.run!(...) to be able to select the port,
server and environment (or else hard-code them).
Regards,
Brian.