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 Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
e6e09c540f
commit
607dac69a9
1 changed files with 13 additions and 3 deletions
16
debian/scripts/koha-remove
vendored
16
debian/scripts/koha-remove
vendored
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue