Stop the server when going background