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>
(cherry picked from commit
3bca90eb0c0fc91f64f3e479ac6ab25e54d4f1aa)
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit
97bf5b40c9da1ba4bca114185fb0770edfaf65f1)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>