Add end_service method to stop the service that started by run_service method.