Koha/debian/templates/koha-sites.conf
Andreas Roussos f12dabe6cc Bug 21440: koha-create expects the file passed by $DEFAULTSQL to be in gzip format
koha-create contains a call to `zcat` which fails if the file passed
as an argument is not in gzip format.

This patch fixes the issue by adding the -f flag to the zcat call in
koha-create, as per the top-voted answers in the following SE URLs:
https://unix.stackexchange.com/a/77309
https://unix.stackexchange.com/a/131944

Test plan:
1) in /etc/koha/koha-sites.conf, set the DEFAULTSQL variable to point
   to an _uncompressed_ SQL database dump
2) run `koha-create --create-db instance` and notice how it fails with:
   gzip: /path/to/dump.sql: not in gzip format
3) apply the patch
4) notice the extra line of information "The SQL file can be optionally
   compressed with gzip" in koha-sites.conf
5) run the `koha-create` command again, this time it should work
6) repeat with DEFAULTSQL pointing to a gzip'd dump, it should work too

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 09:59:10 +00:00

52 lines
1.5 KiB
Text

# NOTE: for a complete list of valid options please read koha-create(8)
## Apache virtual hosts creation variables
#
# Please note that the URLs are built like this:
# OPAC: http://<OPACPREFIX><INSTANCE NAME><OPACSUFFIX><DOMAIN>:<OPACPORT>
# STAFF: http://<INTRAPREFIX><INSTANCE NAME><INTRASUFFIX><DOMAIN>:<INTRAPORT>
DOMAIN=".myDNSname.org"
INTRAPORT="80"
INTRAPREFIX=""
INTRASUFFIX="-intra"
OPACPORT="80"
OPACPREFIX=""
OPACSUFFIX=""
## Default data to be loaded
#
# DEFAULTSQL: filename
# Specify an SQL file with default data to load during instance creation
# The SQL file can be optionally compressed with gzip
# default: (empty)
DEFAULTSQL=""
## Zebra global configuration variables
#
# ZEBRA_MARC_FORMAT: 'marc21' | 'normarc' | 'unimarc'
# Specifies the MARC records format for indexing
# default: 'marc21'
ZEBRA_MARC_FORMAT="marc21"
# ZEBRA_LANGUAGE: 'cs' | 'en' | 'es' | 'fr' | 'gr' | 'nb' | 'ru' | 'uk'
# Primary language for Zebra indexing
# default: 'en'
ZEBRA_LANGUAGE="en"
## Memcached global configuration variables
#
# USE_MEMCACHED: 'yes' | 'no'
# Make the created instance use memcached. Can be altered later.
# default: 'yes'
USE_MEMCACHED="yes"
# MEMCACHED_SERVERS: comma separated list of memcached servers (ip:port)
# Specify a list of memcached servers for the Koha instance
# default: '127.0.0.1:11211'
MEMCACHED_SERVERS="127.0.0.1:11211"
# MEMCACHED_PREFIX:
# Specify a string to be used as prefix for defining the memcached namespace
# for the created instance.
# default: 'koha_'
MEMCACHED_PREFIX="koha_"