for now always restart docker daemon, not send HUP as most changes require it

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-01-26 11:49:04 +00:00
parent 8b86109756
commit c540664234

View File

@ -5,6 +5,7 @@ import (
"io/ioutil"
"log"
"os"
"os/exec"
"strconv"
"syscall"
)
@ -43,6 +44,14 @@ func main() {
if n == 0 {
continue
}
// a few changes eg debug do not require a daemon restart
// however at present we cannot check changes, and most do
restart := true
if restart {
cmd := exec.Command("service", "docker", "restart")
// not much we can do if it does not restart
_ = cmd.Run()
} else {
bytes, err := ioutil.ReadFile(huppidfile)
if err != nil {
continue
@ -54,4 +63,5 @@ func main() {
}
syscall.Kill(pid, syscall.SIGHUP)
}
}
}