code: func (svc *Service) stop() {
  	// TODO(jsing): Check if it is actually running?
  	log.Infof("Stopping service %s...", svc.name)
  
  	// Wait for dependents to shutdown.
  	for _, dep := range svc.dependents {
  		log.Infof("Service %s waiting for %s to stop", svc.name, dep.name)
  		stopped := <-dep.stopped
  		dep.stopped <- stopped
  	}
  
  	svc.shutdown <- true
  	svc.signal(syscall.SIGTERM)
  	select {
  	case <-svc.done:
  	case <-time.After(svc.termTimeout):
  		svc.signal(syscall.SIGKILL)
  		<-svc.done
  	}
  	log.Infof("Service %s stopped", svc.name)
  	svc.stopped <- true
  }
docs: // stop stops a running service.