Bug 40901: (QA follow-up) Remove redundant unit files ( koha-sysv.service, koha-worker@.service )

Nothing ever used either of these files. On systemd hosts koha-sysv
already gets a generated koha-common.service, so shipping its own unit
meant two units driving the same init script. The koha-worker@.service
sample in /etc/koha was a copy-by-hand template that koha-systemd's
real worker unit replaces.

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40901#c129
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-07-24 12:12:04 -04:00 committed by Pedro Amorim
parent 653d6092b5
commit de946eac7f
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
4 changed files with 3 additions and 47 deletions

View File

@ -1,2 +1 @@
debian/koha-sysv.init etc/init.d/koha-common debian/koha-sysv.init etc/init.d/koha-common
debian/koha-sysv.service lib/systemd/system/

View File

@ -6,8 +6,9 @@ case "$1" in
configure) configure)
# Bug 18250: Correct startup order of koha-common and memcached. # Bug 18250: Correct startup order of koha-common and memcached.
# On non-systemd systems only: force the rc.d ordering. # On non-systemd systems only: force the rc.d ordering.
# On systemd, dh_installsystemd (via #DEBHELPER# below) enables and # On systemd hosts, systemd-sysv-generator wraps /etc/init.d/koha-common
# starts koha-sysv.service automatically; no manual enable needed. # as koha-common.service and honors the rc.d symlinks; no manual
# enable needed.
if [ ! -d /run/systemd/system ]; then if [ ! -d /run/systemd/system ]; then
update-rc.d koha-common disable update-rc.d koha-common disable
update-rc.d koha-common enable update-rc.d koha-common enable

View File

@ -1,25 +0,0 @@
# koha-common.service
# /etc/systemd/system/koha-common.service
[Unit]
Description=Start required services for each Koha instance
SourcePath=/etc/init.d/koha-common
Before=multi-user.target
Before=graphical.target
After=remote-fs.target
After=memcached.service
[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/etc/init.d/koha-common start
ExecStop=/etc/init.d/koha-common stop
[Install]
WantedBy=multi-user.target

View File

@ -1,19 +0,0 @@
# koha-worker@.service
# /etc/systemd/system/koha-worker@.service
[Unit]
Description=Koha Task Queue Worker
After=syslog.target network.target
[Service]
User=%i-koha
Environment=PERL5LIB=/usr/share/koha/lib
Environment=KOHA_CONF=/etc/koha/sites/%i/koha-conf.xml
ExecStart=/usr/share/koha/bin/workers/background_jobs_worker.pl
Restart=on-failure
RestartSec=5s
StartLimitBurst=3
StartLimitInterval=60
SyslogIdentifier=%i-koha-worker
[Install]
WantedBy=multi-user.target