Bug 33108: Make init handle koha-es-indexer
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 1 Mar 2023 19:04:25 +0000 (16:04 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 20 Mar 2023 12:39:47 +0000 (09:39 -0300)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 33108: (follow-up) Fix typo

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
debian/koha-common.init
debian/scripts/koha-remove

index bc00c76..4f0bae9 100755 (executable)
@@ -70,6 +70,8 @@ do_start()
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then
         koha-indexer --start --quiet $(koha-list --enabled)
     fi
+
+    koha-es-indexer --start --quiet $(koha-list --enabled --elasticsearch)
 }
 
 #
@@ -90,6 +92,8 @@ do_stop()
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then
         koha-indexer --stop --quiet $(koha-list --enabled)
     fi
+
+    koha-es-indexer --stop --quiet $(koha-list --enabled --elasticsearch)
 }
 
 #
@@ -108,6 +112,8 @@ do_reload() {
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then
         koha-indexer --restart --quiet $(koha-list --enabled)
     fi
+
+    koha-es-indexer --restart --quiet $(koha-list --enabled --elasticsearch)
 }
 
 #
index 7270661..a6653e0 100755 (executable)
@@ -93,6 +93,10 @@ eof
     if is_sip_running $name; then
         koha-sip --stop $name || /bin/true
     fi
+    # Stop the ES indexing daemon if needed
+    if is_es_indexer_running $name; then
+        koha-es-indexer --stop $name || /bin/true
+    fi
 
     instancefile=$(get_apache_config_for $name)
     le_opacdomain=$(letsencrypt_get_opacdomain_for $name)