diff --git a/driver.go b/driver.go index 9f7778f4..deafbde7 100644 --- a/driver.go +++ b/driver.go @@ -20,7 +20,6 @@ import ( "context" "fmt" "github.com/hashicorp/consul-template/signals" - "os" "os/user" "path/filepath" "strings" @@ -678,12 +677,11 @@ func (d *Driver) SignalTask(taskID string, signal string) error { // The given signal will be forwarded to the target taskID. // Please checkout https://github.com/hashicorp/consul-template/blob/master/signals/signals_unix.go // for a list of supported signals. - sig := os.Interrupt - if s, ok := signals.SignalLookup[signal]; ok { - sig = s - } else { - d.logger.Warn("unknown signal to send to task, using SIGINT instead", "signal", signal, "task_id", handle.taskConfig.ID) + sig, ok := signals.SignalLookup[signal] + if !ok { + return fmt.Errorf("Error in looking up signal: %s", signal) } + return d.podmanClient.SignalContainer(handle.containerID, sig) }