diff --git a/service_upstart_linux.go b/service_upstart_linux.go index 660357f..be404d9 100644 --- a/service_upstart_linux.go +++ b/service_upstart_linux.go @@ -13,7 +13,6 @@ import ( "strings" "syscall" "text/template" - "time" ) func isUpstart() bool { @@ -225,12 +224,7 @@ func (s *upstart) Stop() error { } func (s *upstart) Restart() error { - err := s.Stop() - if err != nil { - return err - } - time.Sleep(50 * time.Millisecond) - return s.Start() + return run("initctl", "restart", s.Name) } // The upstart script should stop with an INT or the Go runtime will terminate