Hi,

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 :)


-- 
Mariano Absatz - El Baby
www.clueless.com.ar

Attachment: unbound-control-q.patch
Description: Binary data

_______________________________________________
Unbound-users mailing list
[email protected]
http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users

Reply via email to