If koha-rebuild-zebra is given no arguments, it displays the usage. That's quite reasonable, however it means that if you have koha-common installed but no instances defined, you get emailed every 5 minutes about it. I'm going to add a -q flag that is used by the cron job that suppresses the usage message.
Created attachment 18489 [details] [review] Bug 10379 - silence zebra rebuild cron when no instances are enabled This adds a -q option to koha-rebuild-zebra that prevents it outputting help if no instances are provided on the command line. This means that if you've just installed the package, you won't get messages from cron telling you how to use the script. Test plan: * install koha-common 3.12 or master onto a system with no enabled instances. * note that you or the sysadmin will start getting emails every 5 minutes. * replace /etc/cron.d/koha-common and /usr/sbin/koha-rebuild-zebra with the versions from this patch. * note that the emails stop flowing.
Created attachment 19205 [details] [review] Bug 10379 - [SIGNED-OFF] silence zebra rebuild cron when no instances are enabled This adds a -q option to koha-rebuild-zebra that prevents it outputting help if no instances are provided on the command line. This means that if you've just installed the package, you won't get messages from cron telling you how to use the script. Test plan: * install koha-common 3.12 or master onto a system with no enabled instances. * note that you or the sysadmin will start getting emails every 5 minutes. * replace /etc/cron.d/koha-common and /usr/sbin/koha-rebuild-zebra with the versions from this patch. * note that the emails stop flowing. Signed-off-by: Magnus Enger <magnus@enger.priv.no> "sudo koha-rebuild-zebra -q" gives no output, as expected. Followed the test plan, all looks good.
I'm going to pass QA this, as it's simple, only packaging related, and reasonably important.
Created attachment 19219 [details] [review] Bug 10379 - Followup: add koha-rebuild-zebra -q to the man page git bz gave me this error when I tried to "attach" this patch: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 336: ordinal not in range(128) but I can't seem to find anything wrong with the patch...
Resetting this to "needs signoff" because of the followup.
Created attachment 19238 [details] [review] Bug 10379 - Followup: add koha-rebuild-zebra -q to the man page The first patch on this bug forgot to add the new -q option to koha-rebuild-zebra to the man page for that command. This patch fixes it. To test, run something like these commands: $ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \ debian/docs/koha-rebuild-zebra.xml $ man -l koha-rebuild-zebra.8 This should display the man page. (Remember to remove koha-rebuild-zebra.8 when you are done :-) $ prove xt/verify-debian-docbook.t All tests should pass. Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Pushed to master. Thanks, Robin!
This patch has been pushed to 3.12.x, will be in 3.12.2. Thanks Robin!
Pushed to 3.10.x, will be in 3.10.8
Pushed to 3.8.x, will be in 3.8.15