Bugzilla – Attachment 56701 Details for
Bug 4880
koha-remove sometimes fails because user is logged in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4880: Make koha-remove stop all instance's services
Bug-4880-Make-koha-remove-stop-all-instances-servi.patch (text/plain), 1.95 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-10-20 15:04:38 UTC
(
hide
)
Description:
Bug 4880: Make koha-remove stop all instance's services
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-10-20 15:04:38 UTC
Size:
1.95 KB
patch
obsolete
>From f0fca769e80036d55185c1ea61fc9d3998c27b75 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 20 Oct 2016 11:58:32 -0300 >Subject: [PATCH] Bug 4880: Make koha-remove stop all instance's services > >This patch makes koha-remove stop all instance's services before >attempting to remove the system user, > >Before this patch, only zebra was stopped. > >To test: >- Run: > $ sudo koha-create --created-db favourite_name >- Run: > $ sudo koha-remove favourite_name >=> FAIL: koha-indexer is still running for user favourite_name-koha >- Run: > $ sudo koha-create --created-db another_name > $ sudo koha-plack --enable another_name > $ sudo koha-plack --start another_name > $ sudo koha-indexer --stop another_name > $ sudo koha-remove another_name >=> FAIL: koha-plack is still running for user another_name-koha >- Apply the patch >- Repeat the previous tests, with new names >=> SUCCESS: Everything works as expected :-D >- Sign off :-D >--- > debian/scripts/koha-remove | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > >diff --git a/debian/scripts/koha-remove b/debian/scripts/koha-remove >index 4342c5d..67e2402 100755 >--- a/debian/scripts/koha-remove >+++ b/debian/scripts/koha-remove >@@ -75,9 +75,19 @@ DROP DATABASE IF EXISTS \`koha_$name\`; > FLUSH PRIVILEGES; > eof > fi #` >- >- # If the daemon is not running already, we don't want to fail this loop. So bin the result code if this fails. >- koha-stop-zebra $name || /bin/true >+ >+ # Stop the Zebra server if needed >+ if is_zebra_running $name; then >+ koha-stop-zebra $name || /bin/true >+ fi >+ # Stop the indexer daemon if needed >+ if is_indexer_running $name; then >+ koha-indexer --stop $name || /bin/true >+ fi >+ # Stop the Plack server if needed >+ if is_plack_running $name; then >+ koha-plack --stop $name || /bin/true >+ fi > > instancefile=$(get_apache_config_for $name) > le_opacdomain=$(letsencrypt_get_opacdomain_for $name) >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4880
:
56701
|
56910
|
56965