Missed initializing another field in Template!
This commit is contained in:
parent
531af8f932
commit
6011a74ab9
11
api/tasks.go
11
api/tasks.go
|
@ -334,10 +334,13 @@ func (tmpl *Template) Canonicalize() {
|
|||
if tmpl.ChangeMode == nil {
|
||||
tmpl.ChangeMode = helper.StringToPtr("restart")
|
||||
}
|
||||
if *tmpl.ChangeMode == "signal" && tmpl.ChangeSignal == nil {
|
||||
tmpl.ChangeSignal = helper.StringToPtr("SIGHUP")
|
||||
}
|
||||
if tmpl.ChangeSignal != nil {
|
||||
if tmpl.ChangeSignal == nil {
|
||||
if *tmpl.ChangeMode == "signal" {
|
||||
tmpl.ChangeSignal = helper.StringToPtr("SIGHUP")
|
||||
} else {
|
||||
tmpl.ChangeSignal = helper.StringToPtr("")
|
||||
}
|
||||
} else {
|
||||
sig := *tmpl.ChangeSignal
|
||||
tmpl.ChangeSignal = helper.StringToPtr(strings.ToUpper(sig))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue