Made the server able to run as a service.