oort/cmdctrl.go
func (o *Server) Stop() error {
	o.cmdCtrlLock.Lock()
	defer o.cmdCtrlLock.Unlock()
	if o.stopped {
		return fmt.Errorf("Service already stopped")
	}
	close(o.ch)
	o.backend.StopListenAndServe()
	o.backend.Wait()
	o.backend.Stop()
	o.stopped = true
	return nil
}
func (o *Server) Stop() error {
	o.cmdCtrlLock.Lock()
	defer o.cmdCtrlLock.Unlock()
	if o.stopped {
		return fmt.Errorf("Service already stopped")
	}
	close(o.ch)
	o.backend.StopListenAndServe()
	o.backend.Wait()
	o.backend.Stop()
	o.stopped = true
	return nil
}
// Stop the backend and shutdown all listeners.
// Does NOT exist the process.