Bug 40901: (follow-up) Fix critical bugs in systemd integration

- koha-sip: disable_sip() was calling 'enable' instead of 'disable'
- koha-indexer: enable/disable dispatch was calling start/stop functions
- koha-systemd.postinst: upgrade try-restart was outside the case block

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
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:
Tomás Cohen Arazi 2026-04-27 12:04:52 -03:00 committed by Pedro Amorim
parent 142ab7320f
commit 630b1c377d
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
3 changed files with 10 additions and 11 deletions

View File

@ -5,15 +5,14 @@ case "$1" in
configure)
# Reload systemd daemon
systemctl daemon-reload || true
# on upgrade, restart running Koha services so they pick up new code/unit files
if [ -n "$2" ]; then
deb-systemd-invoke try-restart \
'koha-*@*.service' \
>/dev/null || true
fi
;;
# on upgrade, restart running Koha services so they pick up new code/unit files
if [ -n "$2" ]; then
deb-systemd-invoke try-restart \
'koha-*@*.service' \
>/dev/null || true
fi
esac
#DEBHELPER#

View File

@ -203,10 +203,10 @@ if [ $# -gt 0 ]; then
restart_indexer $name
;;
"enable")
start_indexer $name
enable_indexer $name
;;
"disable")
stop_indexer $name
disable_indexer $name
;;
"status")
indexer_status $name

View File

@ -128,7 +128,7 @@ disable_sip()
local libdir=/var/lib/koha/${name}
if [ "$(koha_init_backend)" = "systemd" ]; then
koha_service_ctl enable sip "$name"
koha_service_ctl disable sip "$name"
fi
if is_sip_enabled ${name}; then