Skip to content

Commit

Permalink
Add server argument as first argument in unbound input (#4062)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfedr authored and danielnelson committed Apr 23, 2018
1 parent 0b795d6 commit e610f2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/inputs/unbound/unbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func unboundRunner(cmdName string, Timeout internal.Duration, UseSudo bool, Serv
server = server + "@" + port
}

cmdArgs = append(cmdArgs, "-s", server)
cmdArgs = append([]string{"-s", server}, cmdArgs...)
}

cmd := exec.Command(cmdName, cmdArgs...)
Expand All @@ -101,7 +101,7 @@ func unboundRunner(cmdName string, Timeout internal.Duration, UseSudo bool, Serv
cmd.Stdout = &out
err := internal.RunTimeout(cmd, Timeout.Duration)
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
Expand Down

0 comments on commit e610f2b

Please sign in to comment.