Bug 19465: Add --elasticsearch-server option to koha-create
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 13 Oct 2017 18:59:25 +0000 (15:59 -0300)
committerJoy Nelson <joy@bywatersolutions.com>
Sun, 12 Jan 2020 18:44:43 +0000 (18:44 +0000)
commit0453ec44b2531dceaf58e1b1cfb83ea24f84e52c
tree2dae4d094b2df5e65ae757e193617df9a50b33d4
parent423cc1053d8740fe220325d2ec1821320e057e14
Bug 19465: Add --elasticsearch-server option to koha-create

This patch adds the --elasticsearch-server option switch to koha-create.
It allows choosing a different Elasticsearch configuration. It defaults
to the current 'localhost:9200' value.

To test:
- Apply this patches
- Run:
  $ reset_all
  $ man koha-create
=> SUCCESS: The man page shows correct information about the added
option switch
- Run:
  $ sudo koha-create --create-db test
=> SUCCESS: /etc/koha/sites/test/koha-conf.xml contains the default
   value (i.e. the current behaviour is kept)
- Run:
  $ sudo koha-create --create-db --elasticsearch-server tomas:1234 test2
=> SUCCESS: /etc/koha/sites/test2/koha-conf.xml contains the passed
   value in the <elasticsearch><server> section.
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
debian/scripts/koha-create
debian/templates/koha-conf-site.xml.in