Bug 10101 - make koha-enable more robust
authorTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 23 Apr 2013 14:03:44 +0000 (11:03 -0300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 2 May 2013 02:00:13 +0000 (22:00 -0400)
commit3bca90eb0c0fc91f64f3e479ac6ab25e54d4f1aa
treedb25e70837a880ba55a708a7d8d495a852744f06
parentca118d57db383f5efebc4d53cba11ccc8af5c9a9
Bug 10101 - make koha-enable more robust

koha-enable now:

- checks for the existence of the instance before any other action on it.
- checks if the instance is already enabled before changing stuff in the config files.
- only reloads apache if it is needed!
- handles more than one instance name as parameter (the code was there, a check for the cardinality of the args prevented it from working).
- documents this behaviour change in the docs
- doesn't break if the provided (invalid) instance name is a prefix/suffix of a real one (added -x to the relevant grep command).

To test:
- Aplpy the patch, build your packages
- Run koha-enable on
  - Non existent instance (try using a prefix or a suffix of an already created one too).
  - Already enabled existent instance name.
  - Disabled instance.

Regards
To+

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
debian/docs/koha-enable.xml
debian/scripts/koha-enable