- koha_init_backend relied on "systemctl list-unit-files" exiting non-zero when nothing matches. That behaviour is version dependent, and on a systemd host running koha-sysv a false positive would send every koha-* helper to units that do not exist. Test for the koha-plack@.service unit file instead: unambiguous, and no systemctl fork per call. The _KOHA_INIT_BACKEND cache is dropped; every caller ran the function in a $(...) subshell so it never took effect anyway. - The _sysv_worker and _sysv_z3950 code moved here from bash-only scripts brought "((error_count++))" and "[[ ! $VAR ]]" into a #!/bin/sh library that koha-disable, koha-enable, koha-remove, koha-list and the init script source under dash. Use POSIX equivalents. - _sysv_restart_zebra and _sysv_restart_sip lost the explicit "return 0" of the original quiet not-running branch, so a start failure now aborted the caller's whole instance loop under set -e (including the init script's restart across all instances). Restore it. - systemctl status is run with --no-pager from koha_service_ctl and koha-systemd-ctl so the helpers never block on a pager. - koha-plack --enable/--disable ran systemctl before editing the Apache configuration, so a systemctl failure under set -e left the vhost untouched. Do the systemd half after the Apache edits and warn instead of aborting. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> |
||
|---|---|---|
| .. | ||
| docs | ||
| scripts | ||
| source | ||
| systemd | ||
| templates | ||
| README.build | ||
| bd-to-depends | ||
| build-git-snapshot | ||
| changelog | ||
| clean | ||
| compat | ||
| control | ||
| control.in | ||
| copyright | ||
| koha-common.README.Debian | ||
| koha-common.docs | ||
| koha-common.maintscript | ||
| koha-common.postinst | ||
| koha-common.preinst | ||
| koha-core.bash-completion | ||
| koha-core.config | ||
| koha-core.dirs | ||
| koha-core.docs | ||
| koha-core.install | ||
| koha-core.koha-common.cron.d | ||
| koha-core.koha-common.cron.daily | ||
| koha-core.koha-common.cron.hourly | ||
| koha-core.koha-common.cron.monthly | ||
| koha-core.koha-common.default | ||
| koha-core.koha-common.logrotate | ||
| koha-core.links | ||
| koha-core.maintscript | ||
| koha-core.postinst | ||
| koha-core.preinst | ||
| koha-core.templates | ||
| koha-full.postinst | ||
| koha-post-install-setup | ||
| koha-systemd.README.Debian | ||
| koha-systemd.dirs | ||
| koha-systemd.install | ||
| koha-systemd.postinst | ||
| koha-systemd.postrm | ||
| koha-systemd.prerm | ||
| koha-sysv.koha-common.init | ||
| koha-sysv.postinst | ||
| koha.README.Debian | ||
| koha.apache-ports | ||
| koha.config | ||
| koha.dirs | ||
| koha.install | ||
| koha.postinst | ||
| koha.postrm | ||
| koha.prerm | ||
| list-deps | ||
| rules | ||
| unavailable.html | ||
| update-control | ||
README.build
In order to build .deb packages, following debian packages need to be present (installed): devscripts pbuilder dh-make fakeroot As root (or sudo) execute: pbuilder create Executing build-git-snapshot without any arguments will leave package and the rest in some pbuilder dir, eg. /var/cache/pbuilder/result It is highly recommended that --buildresult option is used.