From d0d193ea7ed21736a0432eda5111ef0d98c30576 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 8 May 2026 12:45:41 -0400 Subject: [PATCH] Bug 40901: (follow-up) Clean up stale Zebra Unix sockets on startup zebrasrv removes its Unix sockets on clean exit but leaves them behind on SIGKILL, OOM, or sysv to systemd swap, causing 'Address already in use' on the next start. ExecStartPre rm makes the unit auto-fix itself. Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim --- debian/systemd/koha-zebra@.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/systemd/koha-zebra@.service b/debian/systemd/koha-zebra@.service index 176ae32936..c169e2bb16 100644 --- a/debian/systemd/koha-zebra@.service +++ b/debian/systemd/koha-zebra@.service @@ -13,6 +13,8 @@ Environment=KOHA_CONF=/etc/koha/sites/%i/koha-conf.xml Environment=KOHA_HOME=/usr/share/koha PIDFile=/var/run/koha/%i/zebra.pid ExecStartPre=+/usr/sbin/koha-generate-env zebra %i +# Clean up leftover Zebra socket files so Zebra can rebind on startup. +ExecStartPre=+/bin/rm -f /var/run/koha/%i/bibliosocket /var/run/koha/%i/authoritysocket EnvironmentFile=-/run/koha/%i/zebra.env ExecStart=/usr/bin/zebrasrv \ -v ${ZEBRA_LOGLEVELS} \