|
Lines 69-74
Options:
Link Here
|
| 69 |
--database dbname Enforce the use of the specified DB name (64 char limit) |
69 |
--database dbname Enforce the use of the specified DB name (64 char limit) |
| 70 |
--adminuser n Explicit the admin user ID in the DB. Relevant in |
70 |
--adminuser n Explicit the admin user ID in the DB. Relevant in |
| 71 |
conjunction with --defaultsql and --populate-db. |
71 |
conjunction with --defaultsql and --populate-db. |
|
|
72 |
--upload-path dir Set a user defined upload_path. It defaults to |
| 73 |
/var/lib/koha/<instance>/uploads |
| 72 |
--help,-h Show this help. |
74 |
--help,-h Show this help. |
| 73 |
|
75 |
|
| 74 |
Note: the instance name cannot be longer that 11 chars. |
76 |
Note: the instance name cannot be longer that 11 chars. |
|
Lines 107-112
generate_config_file() {
Link Here
|
| 107 |
-e "s/__DB_PASS__/$mysqlpwd/g" \ |
109 |
-e "s/__DB_PASS__/$mysqlpwd/g" \ |
| 108 |
-e "s/__UNIXUSER__/$username/g" \ |
110 |
-e "s/__UNIXUSER__/$username/g" \ |
| 109 |
-e "s/__UNIXGROUP__/$username/g" \ |
111 |
-e "s/__UNIXGROUP__/$username/g" \ |
|
|
112 |
-e "s/__UPLOAD_PATH__/$UPLOAD_PATH/g" \ |
| 110 |
-e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \ |
113 |
-e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \ |
| 111 |
-e "s/__MEMCACHED_NAMESPACE__/$MEMCACHED_NAMESPACE/g" \ |
114 |
-e "s/__MEMCACHED_NAMESPACE__/$MEMCACHED_NAMESPACE/g" \ |
| 112 |
-e "s/__MEMCACHED_SERVERS__/$MEMCACHED_SERVERS/g" \ |
115 |
-e "s/__MEMCACHED_SERVERS__/$MEMCACHED_SERVERS/g" \ |
|
Lines 286-291
set_memcached()
Link Here
|
| 286 |
|
289 |
|
| 287 |
} |
290 |
} |
| 288 |
|
291 |
|
|
|
292 |
set_upload_path() |
| 293 |
{ |
| 294 |
local $instance="$1" |
| 295 |
|
| 296 |
if [ "$CLO_UPLOAD_PATH" != "" ]; then |
| 297 |
UPLOAD_PATH=$CLO_UPLOAD_PATH |
| 298 |
else |
| 299 |
UPLOAD_PATH="$UPLOAD_PATH_BASE/$instance/$UPLOAD_DIR" |
| 300 |
fi |
| 301 |
} |
| 302 |
|
| 289 |
enable_sru_server() |
303 |
enable_sru_server() |
| 290 |
{ |
304 |
{ |
| 291 |
# remove the commenting symbols |
305 |
# remove the commenting symbols |
|
Lines 318-323
MEMCACHED_PREFIX=""
Link Here
|
| 318 |
# hardcoded memcached defaults |
332 |
# hardcoded memcached defaults |
| 319 |
DEFAULT_MEMCACHED_SERVERS="127.0.0.1:11211" |
333 |
DEFAULT_MEMCACHED_SERVERS="127.0.0.1:11211" |
| 320 |
DEFAULT_MEMCACHED_PREFIX="koha_" |
334 |
DEFAULT_MEMCACHED_PREFIX="koha_" |
|
|
335 |
# hardcoded upload_path |
| 336 |
UPLOAD_PATH_BASE="/var/lib/koha" |
| 337 |
UPLOAD_DIR="uploads" |
| 338 |
UPLOAD_PATH="" |
| 321 |
|
339 |
|
| 322 |
# SRU server variables |
340 |
# SRU server variables |
| 323 |
ENABLE_SRU="no" |
341 |
ENABLE_SRU="no" |
|
Lines 343-349
fi
Link Here
|
| 343 |
|
361 |
|
| 344 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
362 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
| 345 |
|
363 |
|
| 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:, \ |
364 |
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:,upload-path:, \ |
| 347 |
-n "$0" -- "$@"` |
365 |
-n "$0" -- "$@"` |
| 348 |
|
366 |
|
| 349 |
# Note the quotes around `$TEMP': they are essential! |
367 |
# Note the quotes around `$TEMP': they are essential! |
|
Lines 358-363
CLO_BIBLIOS_INDEXING_MODE=""
Link Here
|
| 358 |
CLO_AUTHORITIES_INDEXING_MODE="" |
376 |
CLO_AUTHORITIES_INDEXING_MODE="" |
| 359 |
CLO_MEMCACHED_SERVERS="" |
377 |
CLO_MEMCACHED_SERVERS="" |
| 360 |
CLO_MEMCACHED_PREFIX="" |
378 |
CLO_MEMCACHED_PREFIX="" |
|
|
379 |
CLO_UPLOAD_PATH="" |
| 361 |
|
380 |
|
| 362 |
|
381 |
|
| 363 |
while true ; do |
382 |
while true ; do |
|
Lines 398-403
while true ; do
Link Here
|
| 398 |
ENABLE_SRU="yes" ; shift ;; |
417 |
ENABLE_SRU="yes" ; shift ;; |
| 399 |
--sru-port) |
418 |
--sru-port) |
| 400 |
SRU_SERVER_PORT="$2" ; shift 2 ;; |
419 |
SRU_SERVER_PORT="$2" ; shift 2 ;; |
|
|
420 |
--upload-path) |
| 421 |
CLO_UPLOAD_PATH="$2" ; shift 2 ;; |
| 401 |
-h|--help) |
422 |
-h|--help) |
| 402 |
usage ; exit 0 ;; |
423 |
usage ; exit 0 ;; |
| 403 |
--) |
424 |
--) |
|
Lines 458-463
set_authorities_indexing_mode $AUTHORITIES_INDEXING_MODE $ZEBRA_MARC_FORMAT
Link Here
|
| 458 |
|
479 |
|
| 459 |
name="$1" |
480 |
name="$1" |
| 460 |
|
481 |
|
|
|
482 |
set_upload_path $name |
| 483 |
|
| 461 |
if [ "$USE_MEMCACHED" = "yes" ]; then |
484 |
if [ "$USE_MEMCACHED" = "yes" ]; then |
| 462 |
set_memcached $name |
485 |
set_memcached $name |
| 463 |
elif [ "$CLO_MEMCACHED_SERVERS" != "" ] || \ |
486 |
elif [ "$CLO_MEMCACHED_SERVERS" != "" ] || \ |