[Unbound-users] option to make unbound-control quiet
wouter at nlnetlabs.nl
Thu Sep 27 09:33:22 UTC 2012
-----BEGIN PGP SIGNED MESSAGE-----
On 09/22/2012 10:08 PM, Mariano Absatz - gmail wrote:
> I use unbound-control locally to reopen the log file after I rotate
> the logs using logrotate. The problem is that when unbound-control
> does contact the server and gets it to do what it wants, it prints
> "ok" on stdout.
> This is annoying if you invoke it from within logrotate or a cron
> file. I know, I can add ">/dev/null" (this is what I did), but it
> is usually nice to have an option to tell any program to not output
> anything unless there is an error.
> Using the attached patch, you use the "-q" (quiet) option so that
> unbound-control doesn't print anything if everything went OK.
> Since it's been decades since the last time I seriously wrote C
> code, my patch is ugly (I don't like it that it is a really inner
> function the one that prints the output and I don't completely
> understand the argc/argv management within go() and go_cmd(), so I
> ended adding one more parameter in the functions.
> Maybe someone who can actually code is able to do it right :)
Thank you for the patch, I have applied it to the svn code repository
for the next version.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
-----END PGP SIGNATURE-----
More information about the Unbound-users