make regexp groups available to custom commands (#642)

This commit is contained in:
aler9
2021-12-08 20:50:09 +01:00
parent bf8e835cab
commit ebc201bda2
11 changed files with 121 additions and 82 deletions

View File

@@ -12,10 +12,10 @@ import (
func (e *Cmd) runInner() bool {
cmd := exec.Command("/bin/sh", "-c", "exec "+e.cmdstr)
cmd.Env = append(os.Environ(),
"RTSP_PATH="+e.env.Path,
"RTSP_PORT="+e.env.Port,
)
cmd.Env = append([]string(nil), os.Environ()...)
for key, val := range e.env {
cmd.Env = append(cmd.Env, key+"="+val)
}
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr