diff --git a/debian/scripts/koha-functions.sh b/debian/scripts/koha-functions.sh index b31b1c6790..90ccf1611e 100755 --- a/debian/scripts/koha-functions.sh +++ b/debian/scripts/koha-functions.sh @@ -242,6 +242,13 @@ get_worker_name() fi } +get_worker_queues() +{ + for queue in default long_tasks; do + echo $queue + done; +} + is_plack_enabled_opac() { local instancefile=$1 diff --git a/debian/scripts/koha-remove b/debian/scripts/koha-remove index a6653e02f8..96eff08d4c 100755 --- a/debian/scripts/koha-remove +++ b/debian/scripts/koha-remove @@ -81,10 +81,12 @@ eof if is_indexer_running $name; then koha-indexer --stop $name || /bin/true fi - # Stop the worker daemon if needed - if is_worker_running $name; then - koha-worker --stop $name || /bin/true - fi + # Stop the worker daemons if needed + for queue in $(get_worker_queues); do + if is_worker_running $name $queue; then + koha-worker --queue $queue --stop $name|| /bin/true + fi + done # Stop the Plack server if needed if is_plack_running $name; then koha-plack --stop $name || /bin/true