[OPEN-ILS-DEV] Script for creating database/updating opensrf.xml database settings

Kevin Beswick kevinbeswick00 at gmail.com
Tue Sep 23 13:52:45 EDT 2008


Hello fellow listers.

Attached is a script - eg_db_config.pl - which a user can run to
either update the database settings in their opensrf.xml, or can run
to retrieve the database settings from opensrf.xml and then run
'build-db.sh' with those settings to create the evergreen databases.

This script would reside in 'Open-ILS/src/extras' and can be run with
any of the following options:

--update-config  --host localhost --port 5432 --dbname evergreen
--user evergreen --password evergreen

This would update your opensrf.xml with all of the specified values
(assuming a default location of /openils/conf/opensrf.xml). You can
choose to only update subsets of those values as well. Also, you can
manually specify a location for opensrf.xml via:

 --configfile /foo/bar/opensrf.xml

To build the database, just run the script with the following option:

--create-schema

This will run build-db.sh (assuming a default location of
Open-ILS/src/sql/Pg/build-db.sh). You can manually specify a location
for build-db.sh by invoking the option:

--builddbfile /foo/bar/build-db.sh


Feedback is definitely appreciated as this is my first attempt with Perl.

-Kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eg_db_config.pl
Type: application/x-perl
Size: 3203 bytes
Desc: not available
Url : http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20080923/0d98e65b/eg_db_config.bin


More information about the Open-ils-dev mailing list