From 8023b38202502d08266f80f30b38d42c471c82c4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 8 May 2026 12:44:48 -0400 Subject: [PATCH] Bug 40901: (follow-up) koha-create enables koha@.target on systemd Without this, freshly-created instances on a koha-systemd host do not auto-start at next boot. Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim --- debian/scripts/koha-create | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index 5c64cbaea0..22961df400 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -922,6 +922,14 @@ then koha-indexer --start "$name" fi + # systemd-only: enable the per-instance target and the + # create-dirs oneshot so the instance comes back up on reboot. + if [ "$(koha_init_backend)" = "systemd" ]; then + systemctl enable koha-create-dirs@${name}.service 2>/dev/null || true + systemctl enable koha@${name}.target 2>/dev/null || true + systemctl start koha.target 2>/dev/null || true + fi + if [ "$CLO_LETSENCRYPT" = "yes" ]; then # Get letsencrypt certificates letsencrypt_instance