Add server argument as first argument in unbound input (#4062)
This commit is contained in:
parent
0b795d662b
commit
e610f2b02d
|
@ -87,7 +87,7 @@ func unboundRunner(cmdName string, Timeout internal.Duration, UseSudo bool, Serv
|
||||||
server = server + "@" + port
|
server = server + "@" + port
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdArgs = append(cmdArgs, "-s", server)
|
cmdArgs = append([]string{"-s", server}, cmdArgs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := exec.Command(cmdName, cmdArgs...)
|
cmd := exec.Command(cmdName, cmdArgs...)
|
||||||
|
@ -101,7 +101,7 @@ func unboundRunner(cmdName string, Timeout internal.Duration, UseSudo bool, Serv
|
||||||
cmd.Stdout = &out
|
cmd.Stdout = &out
|
||||||
err := internal.RunTimeout(cmd, Timeout.Duration)
|
err := internal.RunTimeout(cmd, Timeout.Duration)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &out, fmt.Errorf("error running unbound-control: %s", err)
|
return &out, fmt.Errorf("error running unbound-control: %s (%s %v)", err, cmdName, cmdArgs)
|
||||||
}
|
}
|
||||||
|
|
||||||
return &out, nil
|
return &out, nil
|
||||||
|
|
Loading…
Reference in New Issue