Propagate TERM signal to services

This commit is contained in:
lordwelch 2020-08-22 10:41:34 -07:00
parent 61e410ed9d
commit a8944ecb1a

View File

@ -290,6 +290,15 @@ func Supervise(commands []*exec.Cmd) error {
}
}()
go func() {
c := make(chan os.Signal, 1)
signal.Notify(c, unix.SIGTERM)
for range c {
killSupervisedServices()
}
}()
go func() {
buf := make([]byte, 1)
for {