|
Lines 60-65
Options:
Link Here
|
| 60 |
--use-memcached Set the instance to make use of memcache. |
60 |
--use-memcached Set the instance to make use of memcache. |
| 61 |
--memcached-servers str Set a comma-separated list of host:port memcached servers. |
61 |
--memcached-servers str Set a comma-separated list of host:port memcached servers. |
| 62 |
--memcached-prefix str Set the desired prefix for the instance memcached namespace. |
62 |
--memcached-prefix str Set the desired prefix for the instance memcached namespace. |
|
|
63 |
--enable-sru Enable the SRU server (default: disabled). |
| 64 |
--sru-port Specifiy a TCP port number for the SRU server to listen on. |
| 65 |
(default: 7090). |
| 63 |
--defaultsql some.sql Specify a default SQL file to be loaded on the DB. |
66 |
--defaultsql some.sql Specify a default SQL file to be loaded on the DB. |
| 64 |
--configfile cfg_file Specify an alternate config file for reading default values. |
67 |
--configfile cfg_file Specify an alternate config file for reading default values. |
| 65 |
--passwdfile passwd Specify an alternate passwd file. |
68 |
--passwdfile passwd Specify an alternate passwd file. |
|
Lines 87-92
generate_config_file() {
Link Here
|
| 87 |
-e "s/__ZEBRA_PASS__/$zebrapwd/g" \ |
90 |
-e "s/__ZEBRA_PASS__/$zebrapwd/g" \ |
| 88 |
-e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \ |
91 |
-e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \ |
| 89 |
-e "s/__ZEBRA_LANGUAGE__/$ZEBRA_LANGUAGE/g" \ |
92 |
-e "s/__ZEBRA_LANGUAGE__/$ZEBRA_LANGUAGE/g" \ |
|
|
93 |
-e "s/__SRU_BIBLIOS_PORT__/$SRU_SERVER_PORT/g" \ |
| 94 |
-e "s/__START_SRU_PUBLICSERVER__/$START_SRU_PUBLICSERVER/g" \ |
| 95 |
-e "s/__END_SRU_PUBLICSERVER__/$END_SRU_PUBLICSERVER/g" \ |
| 90 |
-e "s/__BIBLIOS_INDEXING_MODE__/$BIBLIOS_INDEXING_MODE/g" \ |
96 |
-e "s/__BIBLIOS_INDEXING_MODE__/$BIBLIOS_INDEXING_MODE/g" \ |
| 91 |
-e "s/__AUTHORITIES_INDEXING_MODE__/$AUTHORITIES_INDEXING_MODE/g" \ |
97 |
-e "s/__AUTHORITIES_INDEXING_MODE__/$AUTHORITIES_INDEXING_MODE/g" \ |
| 92 |
-e "s/__ZEBRA_BIBLIOS_CFG__/$ZEBRA_BIBLIOS_CFG/g" \ |
98 |
-e "s/__ZEBRA_BIBLIOS_CFG__/$ZEBRA_BIBLIOS_CFG/g" \ |
|
Lines 280-285
set_memcached()
Link Here
|
| 280 |
|
286 |
|
| 281 |
} |
287 |
} |
| 282 |
|
288 |
|
|
|
289 |
enable_sru_server() |
| 290 |
{ |
| 291 |
# remove the commenting symbols |
| 292 |
START_SRU_PUBLICSERVER="" |
| 293 |
END_SRU_PUBLICSERVER="" |
| 294 |
if [ "$SRU_SERVER_PORT" = "" ]; then |
| 295 |
# --sru-port not passed, use the default |
| 296 |
SRU_SERVER_PORT=$DEFAULT_SRU_SERVER_PORT |
| 297 |
fi |
| 298 |
} |
| 299 |
|
| 283 |
# Set defaults and read config file, if it exists. |
300 |
# Set defaults and read config file, if it exists. |
| 284 |
DOMAIN="" |
301 |
DOMAIN="" |
| 285 |
OPACPORT="80" |
302 |
OPACPORT="80" |
|
Lines 302-307
MEMCACHED_PREFIX=""
Link Here
|
| 302 |
DEFAULT_MEMCACHED_SERVERS="127.0.0.1:11211" |
319 |
DEFAULT_MEMCACHED_SERVERS="127.0.0.1:11211" |
| 303 |
DEFAULT_MEMCACHED_PREFIX="koha_" |
320 |
DEFAULT_MEMCACHED_PREFIX="koha_" |
| 304 |
|
321 |
|
|
|
322 |
# SRU server variables |
| 323 |
ENABLE_SRU="no" |
| 324 |
SRU_SERVER_PORT="" |
| 325 |
# hardcoded default SRU server port |
| 326 |
DEFAULT_SRU_SERVER_PORT="7090" |
| 327 |
START_SRU_PUBLICSERVER="<!--" |
| 328 |
END_SRU_PUBLICSERVER="-->" |
| 329 |
|
| 305 |
# Indexing mode variables (default is DOM) |
330 |
# Indexing mode variables (default is DOM) |
| 306 |
BIBLIOS_INDEXING_MODE="dom" |
331 |
BIBLIOS_INDEXING_MODE="dom" |
| 307 |
AUTHORITIES_INDEXING_MODE="dom" |
332 |
AUTHORITIES_INDEXING_MODE="dom" |
|
Lines 318-324
fi
Link Here
|
| 318 |
|
343 |
|
| 319 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
344 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
| 320 |
|
345 |
|
| 321 |
TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser:,memcached-servers:,memcached-prefix:, \ |
346 |
TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser:,memcached-servers:,memcached-prefix:, \ |
| 322 |
-n "$0" -- "$@"` |
347 |
-n "$0" -- "$@"` |
| 323 |
|
348 |
|
| 324 |
# Note the quotes around `$TEMP': they are essential! |
349 |
# Note the quotes around `$TEMP': they are essential! |
|
Lines 369-374
while true ; do
Link Here
|
| 369 |
CLO_DATABASE="$2" ; shift 2 ;; |
394 |
CLO_DATABASE="$2" ; shift 2 ;; |
| 370 |
-a|--adminuser) |
395 |
-a|--adminuser) |
| 371 |
CLO_ADMINUSER="$2" ; shift 2 ;; |
396 |
CLO_ADMINUSER="$2" ; shift 2 ;; |
|
|
397 |
--enable-sru) |
| 398 |
ENABLE_SRU="yes" ; shift ;; |
| 399 |
--sru-port) |
| 400 |
SRU_SERVER_PORT="$2" ; shift 2 ;; |
| 372 |
-h|--help) |
401 |
-h|--help) |
| 373 |
usage ; exit 0 ;; |
402 |
usage ; exit 0 ;; |
| 374 |
--) |
403 |
--) |
|
Lines 417-422
fi
Link Here
|
| 417 |
|
446 |
|
| 418 |
set_biblios_indexing_mode $BIBLIOS_INDEXING_MODE $ZEBRA_MARC_FORMAT |
447 |
set_biblios_indexing_mode $BIBLIOS_INDEXING_MODE $ZEBRA_MARC_FORMAT |
| 419 |
|
448 |
|
|
|
449 |
if [ "$ENABLE_SRU" != "no" ]; then |
| 450 |
enable_sru_server |
| 451 |
fi |
| 420 |
|
452 |
|
| 421 |
if [ "$CLO_AUTHORITIES_INDEXING_MODE" != "" ]; then |
453 |
if [ "$CLO_AUTHORITIES_INDEXING_MODE" != "" ]; then |
| 422 |
AUTHORITIES_INDEXING_MODE=$CLO_AUTHORITIES_INDEXING_MODE |
454 |
AUTHORITIES_INDEXING_MODE=$CLO_AUTHORITIES_INDEXING_MODE |