Bug 6913: More options for koha-create and koha-remove
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 8 Oct 2011 19:34:24 +0000 (15:34 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 2 Feb 2012 08:15:20 +0000 (09:15 +0100)
commit297d22459f670212624d22a0e48447799004935b
tree4e915d76885466e91e2101007045cf36b3e4e968
parent44377378582a1cbe9b38858f81d33dd1480a195d
Bug 6913: More options for koha-create and koha-remove

This commit makes koha-create more flexible by adding a number of command-line
and configuration options.

The biggest change is to add support for pre-determined MySQL credentials using
a file in /etc/koha/passwd (for security reasons, if you use this feature, make
sure the file is not world-readable). The configuration file has the following
format:
instance:user:password:database
The database is optional, but the other two are both required if you want to
specify MySQL credentials. If no credentials are specified for a given instance,
the standard koha_instance username and an auto-generated password are used.

The following additional command line options are now available:
* --use-db - use a pre-existing database, see also --database
* --database - specify the name of the mysql database (still defaults to
  koha_instance)
* --passwdfile - specify a custom (Koha) passwd file for MySQL credentials

The following additional variables are now available (for use in
koha-sites.conf or a custom config file):
* OPACPORT (previously added but not documented) - port on which the OPAC
  should be served
* OPACPREFIX - prefix for the OPAC's virtual host
* OPACSUFFIX - suffix for the OPAC's virtual host

This commit also adds the --keep-mysql option to koha-remove, which, if
specified, will prevent koha-remove from deleting the database or MySQL user
when removing an instance.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
debian/docs/koha-create.xml
debian/docs/koha-remove.xml
debian/scripts/koha-create
debian/scripts/koha-remove