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 <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Kyle M Hall 2026-05-08 12:45:41 -04:00 committed by Pedro Amorim
parent 5e37c3e412
commit d0d193ea7e
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 2 additions and 0 deletions

View File

@ -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} \