https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44314 Bug ID: 44314 Summary: koha-sitemap always exits 0, even when sitemap generation fails Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: mtj@kohaaloha.com Target Milestone: --- koha-sitemap --generate always exits with status 0, even when sitemap.pl fails for an instance. generate_sitemap returns 1 on failure, but the main loop ignores it and the script ends with an unconditional "exit 0". As a result, a cron job like koha-sitemap --quiet --generate $(koha-list --enabled) never reports a failed sitemap generation: the job always succeeds and monitoring based on exit codes cannot notice that sitemaps are stale. Expected: * koha-sitemap exits with a non-zero status if generation failed for any of the given instances (it should still process the remaining instances). * The failure is reported on stderr, also with --quiet (which is meant to silence notices such as non-existent instance names, not errors). * Cases that are not failures keep exiting 0: instances without sitemap generation enabled, or no instance names at all (e.g. an empty koha-list output with --quiet). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.