Execute poststop

This commit is contained in:
yo 2022-07-10 19:54:23 +02:00
parent 1cb7c5fec7
commit f29aeb2e23

View File

@ -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 {