Bug 4880: Make koha-remove stop all instance's services
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 20 Oct 2016 14:58:32 +0000 (11:58 -0300)
committerJulian Maurice <julian.maurice@biblibre.com>
Tue, 8 Nov 2016 10:00:54 +0000 (11:00 +0100)
commit9807a707c4a8dcd072f9621abe0108d9992000a9
tree93e3eea9f3929cf279bc4e4e2e4ec58557273bc0
parent57b0317fa247415a02dc05835cf30b615d010349
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>
(cherry picked from commit 607dac69a95e7bcb454661bfde71a45ee20d0155)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 275253e52a67c482665adb11e40d3a54554979cb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
debian/scripts/koha-remove