Execute poststop
This commit is contained in:
parent
1cb7c5fec7
commit
f29aeb2e23
11
cmd/stop.go
11
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user