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)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 23 Dec 2019 11:26:01 +0000 (11:26 +0000)
commitd8c95abe96f2874291d68f73c0bffeb35587119c
tree34f07869e3ecd08a624559942fdf9381ac135d8b
parent5d82856f0e79f2d3871df94786583631ce6863ef
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>
debian/scripts/koha-create
debian/templates/koha-conf-site.xml.in