How to properly stop server before maintenance