'Start a managed service'

def start(self):

    if (not self.managed):
        raise RuntimeError(('Cannot    start    unmanaged    service    %s' % self))
    self.log.info('Starting    service    %r:    %r', self.name, self.command)
    env = {}
    env.update(self.environment)
    env['JUPYTERHUB_SERVICE_NAME'] = self.name
    if self.url:
        env['JUPYTERHUB_SERVICE_URL'] = self.url
        env['JUPYTERHUB_SERVICE_PREFIX'] = self.server.base_url
    self.spawner = _ServiceSpawner(cmd=self.command, environment=env, api_token=self.api_token, oauth_client_id=self.oauth_client_id, cwd=self.cwd, hub=self.hub, user=_MockUser(name=self.user, service=self, server=self.orm.server, host=self.host))
    self.spawner.start()
    self.proc = self.spawner.proc
    self.spawner.add_poll_callback(self._proc_stopped)
    self.spawner.start_polling()
