Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/contrib/backends/srndv2/src/srnd/hook.go

17 lines
308 B
Go
Raw Normal View History

package srnd
import (
"log"
"os/exec"
)
func ExecHook(config *HookConfig, group, msgid, ref string) {
cmd := exec.Command(config.exec, group, msgid, ref)
err := cmd.Run()
if err != nil {
b, _ := cmd.CombinedOutput()
log.Println("calling hook", config.name, "failed")
log.Println(string(b))
}
}