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>
This does two things:
* Allows OPACPORT to be specified to change the default OPAC port,
* removes the port number from the ServerName directive, as it's already
handled by the VirtualHost declaration.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Prior to this patch, the koha-restore Debian script did not set the home
directory properly for the system users it created, causing problems down the
line for koha-rebuild-zebra. This patch fixes that by specifying the home
directory.
http://bugs.koha-community.org/show_bug.cgi?id=7216
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Sometimes zebra needs a tmp dir in order to work. This ensures that it
is created both by koha-create-dirs in the packages, and by
rebuild_zebra when it runs.
--
tested ok, signing off
Signed-off-by: Mason James <mtj@kohaaloha.com>
If you accidentally delete one of the files that koha-remove is supposed to
remove, when koha-remove reaches that point in the script, it will die, leaving
later removal steps undone. This patch fixes the problem by checking for the
existence of each file prior to deleting it, so that short of an actual problem
with removing the file, the script can continue. Note that the fix for bug 6929
is also needed to prevent any problems with stopping Zebra from killing
koha-remove.
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Currently, if it attempts to stop a zebra process that doesn't exist,
the script will abort, which leaves things running. This patch prevents
it from aborting.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This patch
- deletes debian/scripts/koha-create.8
- adds debian/docs/koha-create.xml and koha-remove.xml
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This affects only koha package installations that have multiple
instances running. After this patch, it's worth running the upgrade
again to ensure that everything happened correctly the first time.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
The revised patch quotes the variable $mysqldb, as suggested by Frère
Sébastien Marie.
This patch makes sure that pointing DEFAULTSQL in /etc/koha/koha-sites.conf
to any (gzip'ed) file produced by mysqldump works, by adding the name of the
database to the end of the call to mysql, when the specified SQL file is
loaded. Files produced with koha-dump-defaults should still work too.
To test:
- Apply the patch
- Create a new package with build-git-snapshot
- Install the package
- Create an SQL file from an existing installation with mysqldump
- gzip the SQL file
- point DEFAULTSQL to the file in /etc/koha/koha-sites.conf
- create a new site with koha-create --create-db
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
(to be followed by another patch that I think helps too)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Sets the default borrowernumber of staff user to 1 and makes it possible
to override this with ADMINUSER in /etc/koha/koha-sites.conf or with the
--adminuser and -a command line options.
Remember to update the wiki if this gets pushed!
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-create would fail to check that --configfile was set on the
commandline, before either including it if it existed or dying if
it did not. This patch should make sure the existence of a
configfile is only tested if --config is set.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
This should apply against 3.4 and master.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This lets you get into the mysql session for this library instance
really easily. Probably most useful for developers.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This allows the database details (username and database name in
particular) to be modified in between a koha-create --request-db and
--populate-db. Most useful when you discover that the username is too
long or something. Now, when populating the database, the connection
information is reloaded from the koha-conf.xml rather than being
generated from the instance name.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This causes backups for the last two days to be stored by default. The
backups will go into /var/spool/koha.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Order of precedence for config options, from lowest to highest:
1. The defaults set in koha-create itself
2. /etc/koha/koha-sites.conf
3. Config file specified with --configfile
4. Individual options set with --marcflavor, --zebralang, --defaultsql
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This will override the setting in /etc/koha/koha-sites.conf.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This adds the --marcflavor and --zebralang commandline options, as
well as short versions of all options.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit does the following:
* Merge the changelog from the releases of 3.2
* Adds a command 'koha-upgrade-to-3.4' that does the MARC item splitting
stuff.
* Adds a debconf note to make sure people know that they need to run
the above command.
* Fixes the inclusion of jQuery in the packages.
* Makes build-git-snapshot build packages with a 3.5 version.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
By default the packages now set up the cron jobs to handle things like
overdues and email etc. By default, email is off, 'koha-email-enable'
and 'koha-email-disable' can manage this.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This prevents it leaving files lying around in /tmp
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This way, the various cron jobs will not try to do things to it.
They can't, since it is not yet really created.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This is necessary if we do not have access to DB server with sufficient
permissions. The DB server is used for other things, that may well be
the case.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-common.postinst now creates a symlink to the Debian one.
The sysadmin may replace that manually with something that allows
Koha to access a remote mysql server.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>