diff --git a/cmd/stop.go b/cmd/stop.go index ce704e3..2fd1985 100644 --- a/cmd/stop.go +++ b/cmd/stop.go @@ -343,6 +343,17 @@ func StopJail(args []string) { } } + // TODO: Execute poststop + if len(cj.Config.Exec_poststop) > 0 { + fmt.Printf(" > Execute poststop:\n") + _, err := executeCommand(cj.Config.Exec_poststop) + if err != nil { + fmt.Printf("ERROR: %s\n", err.Error()) + } else { + fmt.Printf(" > Execute poststop: OK\n") + } + } + // Remove parameter file pfile := fmt.Sprintf("/var/run/jail.%s.conf", cj.InternalName) if err = os.Remove(pfile); err != nil {