Upstart supports the "restart" option (#193)
This commit is contained in:
committed by
Daniel Theophanes
parent
7c2e4f75a4
commit
3c356ae54c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user