From 699a7a3c0cb8c1979af1bb5857706ad41e4ec619 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 24 Jul 2026 12:12:04 -0400 Subject: [PATCH] Bug 40901: (QA follow-up) Use /run instead of legacy /var/run in unit files systemd 257 warns that these units point PIDFile at the legacy /var/run directory. This patch updates the remaining /var/run/koha paths to /run/koha to match the EnvironmentFile lines; /var/run is a symlink to /run on Debian, so nothing changes at runtime. Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim --- debian/systemd/koha-plack@.service | 6 +++--- debian/systemd/koha-z3950@.service | 4 ++-- debian/systemd/koha-zebra@.service | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/systemd/koha-plack@.service b/debian/systemd/koha-plack@.service index 4ceffdf2cb..1a2e72550b 100644 --- a/debian/systemd/koha-plack@.service +++ b/debian/systemd/koha-plack@.service @@ -14,7 +14,7 @@ WorkingDirectory=/var/lib/koha/%i Environment=KOHA_CONF=/etc/koha/sites/%i/koha-conf.xml Environment=KOHA_HOME=/usr/share/koha Environment=PERL5LIB=/usr/share/koha/lib -PIDFile=/var/run/koha/%i/plack.pid +PIDFile=/run/koha/%i/plack.pid ExecStartPre=+/usr/sbin/koha-generate-env plack %i EnvironmentFile=-/run/koha/%i/plack.env ExecStart=/usr/bin/starman \ @@ -22,12 +22,12 @@ ExecStart=/usr/bin/starman \ --max-requests ${PLACK_MAX_REQUESTS} \ --workers ${PLACK_WORKERS} \ --user %i-koha --group %i-koha \ - --pid /var/run/koha/%i/plack.pid \ + --pid /run/koha/%i/plack.pid \ --daemonize \ --access-log /var/log/koha/%i/plack.log \ --error-log /var/log/koha/%i/plack-error.log \ -E ${PLACK_ENVIRONMENT} \ - --listen /var/run/koha/%i/plack.sock \ + --listen /run/koha/%i/plack.sock \ ${PLACK_PSGIFILE} ExecReload=/bin/kill -HUP $MAINPID ProtectSystem=full diff --git a/debian/systemd/koha-z3950@.service b/debian/systemd/koha-z3950@.service index 7758f484d1..8ad484b1c3 100644 --- a/debian/systemd/koha-z3950@.service +++ b/debian/systemd/koha-z3950@.service @@ -14,14 +14,14 @@ WorkingDirectory=/var/lib/koha/%i Environment=KOHA_CONF=/etc/koha/sites/%i/koha-conf.xml Environment=KOHA_HOME=/usr/share/koha Environment=PERL5LIB=/usr/share/koha/lib -PIDFile=/var/run/koha/%i/z3950-responder.pid +PIDFile=/run/koha/%i/z3950-responder.pid ExecStartPre=+/usr/sbin/koha-generate-env z3950 %i EnvironmentFile=-/run/koha/%i/z3950.env ExecStart=/usr/share/koha/bin/z3950_responder.pl \ ${Z3950_ADDITIONAL_OPTS} \ --config-dir ${Z3950_CONFIGDIR} \ -u %i-koha \ - -p /var/run/koha/%i/z3950-responder.pid \ + -p /run/koha/%i/z3950-responder.pid \ -D \ -d %i-koha-z3950 \ -l /var/log/koha/%i/z3950.log diff --git a/debian/systemd/koha-zebra@.service b/debian/systemd/koha-zebra@.service index 7d1702adfa..d78af5fd7f 100644 --- a/debian/systemd/koha-zebra@.service +++ b/debian/systemd/koha-zebra@.service @@ -13,17 +13,17 @@ Group=%i-koha WorkingDirectory=/var/lib/koha/%i Environment=KOHA_CONF=/etc/koha/sites/%i/koha-conf.xml Environment=KOHA_HOME=/usr/share/koha -PIDFile=/var/run/koha/%i/zebra.pid +PIDFile=/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 +ExecStartPre=+/bin/rm -f /run/koha/%i/bibliosocket /run/koha/%i/authoritysocket EnvironmentFile=-/run/koha/%i/zebra.env ExecStart=/usr/bin/zebrasrv \ -v ${ZEBRA_LOGLEVELS} \ -k ${ZEBRA_MAX_RECORD_SIZE} \ -f /etc/koha/sites/%i/koha-conf.xml \ -m '%%FT%%T' \ - -p /var/run/koha/%i/zebra.pid \ + -p /run/koha/%i/zebra.pid \ -D ProtectSystem=full ProtectHome=yes