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 |
--template-cache-dir Set a user defined template_cache_dir. It defaults to |
73 |
/var/cache/koha/<instance>/templates |
72 |
--upload-path dir Set a user defined upload_path. It defaults to |
74 |
--upload-path dir Set a user defined upload_path. It defaults to |
73 |
/var/lib/koha/<instance>/uploads |
75 |
/var/lib/koha/<instance>/uploads |
74 |
--letsencrypt Set up a https-only site with letsencrypt certificates |
76 |
--letsencrypt Set up a https-only site with letsencrypt certificates |
Lines 112-117
generate_config_file() {
Link Here
|
112 |
-e "s/__DB_PASS__/$mysqlpwd/g" \ |
114 |
-e "s/__DB_PASS__/$mysqlpwd/g" \ |
113 |
-e "s/__UNIXUSER__/$username/g" \ |
115 |
-e "s/__UNIXUSER__/$username/g" \ |
114 |
-e "s/__UNIXGROUP__/$username/g" \ |
116 |
-e "s/__UNIXGROUP__/$username/g" \ |
|
|
117 |
-e "s#__TEMPLATE_CACHE_DIR__#$TEMPLATE_CACHE_DIR#g" \ |
115 |
-e "s#__UPLOAD_PATH__#$UPLOAD_PATH#g" \ |
118 |
-e "s#__UPLOAD_PATH__#$UPLOAD_PATH#g" \ |
116 |
-e "s/__LOG_DIR__/\/var\/log\/koha\/$name/g" \ |
119 |
-e "s/__LOG_DIR__/\/var\/log\/koha\/$name/g" \ |
117 |
-e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \ |
120 |
-e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \ |
Lines 404-409
DEFAULT_MEMCACHED_PREFIX="koha_"
Link Here
|
404 |
UPLOAD_PATH_BASE="/var/lib/koha" |
407 |
UPLOAD_PATH_BASE="/var/lib/koha" |
405 |
UPLOAD_DIR="uploads" |
408 |
UPLOAD_DIR="uploads" |
406 |
UPLOAD_PATH="" |
409 |
UPLOAD_PATH="" |
|
|
410 |
# cache base dir |
411 |
CACHE_DIR_BASE="/var/cache/koha" |
407 |
# Generate a randomizaed API secret |
412 |
# Generate a randomizaed API secret |
408 |
API_SECRET="$(pwgen -s 64 1)" |
413 |
API_SECRET="$(pwgen -s 64 1)" |
409 |
# SRU server variables |
414 |
# SRU server variables |
Lines 432-438
fi
Link Here
|
432 |
|
437 |
|
433 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
438 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
434 |
|
439 |
|
435 |
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:,letsencrypt, \ |
440 |
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:,template-cache-dir:,upload-path:,letsencrypt, \ |
436 |
-n "$0" -- "$@"` |
441 |
-n "$0" -- "$@"` |
437 |
|
442 |
|
438 |
# Note the quotes around `$TEMP': they are essential! |
443 |
# Note the quotes around `$TEMP': they are essential! |
Lines 449-454
CLO_MEMCACHED_SERVERS=""
Link Here
|
449 |
CLO_MEMCACHED_PREFIX="" |
454 |
CLO_MEMCACHED_PREFIX="" |
450 |
CLO_UPLOAD_PATH="" |
455 |
CLO_UPLOAD_PATH="" |
451 |
CLO_LETSENCRYPT="" |
456 |
CLO_LETSENCRYPT="" |
|
|
457 |
CLO_TEMPLATE_CACHE_DIR="" |
452 |
|
458 |
|
453 |
while true ; do |
459 |
while true ; do |
454 |
case "$1" in |
460 |
case "$1" in |
Lines 488-493
while true ; do
Link Here
|
488 |
ENABLE_SRU="yes" ; shift ;; |
494 |
ENABLE_SRU="yes" ; shift ;; |
489 |
--sru-port) |
495 |
--sru-port) |
490 |
SRU_SERVER_PORT="$2" ; shift 2 ;; |
496 |
SRU_SERVER_PORT="$2" ; shift 2 ;; |
|
|
497 |
--template-cache-dir) |
498 |
CLO_TEMPLATE_CACHE_DIR="$2" ; shift 2 ;; |
491 |
--upload-path) |
499 |
--upload-path) |
492 |
CLO_UPLOAD_PATH="$2" ; shift 2 ;; |
500 |
CLO_UPLOAD_PATH="$2" ; shift 2 ;; |
493 |
--letsencrypt) |
501 |
--letsencrypt) |
Lines 574-579
else
Link Here
|
574 |
MEMCACHED_PREFIX="" |
582 |
MEMCACHED_PREFIX="" |
575 |
fi |
583 |
fi |
576 |
|
584 |
|
|
|
585 |
# Set template cache dir |
586 |
if [ "$CLO_TEMPLATE_CACHE_DIR" != "" ]; then |
587 |
TEMPLATE_CACHE_DIR="$CLO_TEMPLATE_CACHE_DIR" |
588 |
else |
589 |
TEMPLATE_CACHE_DIR="$CACHE_DIR_BASE/$name/templates" |
590 |
fi |
591 |
|
577 |
# Are we root? If not, the mod_rewrite check will fail and be confusing, so |
592 |
# Are we root? If not, the mod_rewrite check will fail and be confusing, so |
578 |
# we look into this first. |
593 |
# we look into this first. |
579 |
if [[ $UID -ne 0 ]] |
594 |
if [[ $UID -ne 0 ]] |
Lines 709-715
eof
Link Here
|
709 |
generate_config_file zebra.passwd.in \ |
724 |
generate_config_file zebra.passwd.in \ |
710 |
"/etc/koha/sites/$name/zebra.passwd" |
725 |
"/etc/koha/sites/$name/zebra.passwd" |
711 |
|
726 |
|
712 |
|
|
|
713 |
# Create a GPG-encrypted file for requesting a DB to be set up. |
727 |
# Create a GPG-encrypted file for requesting a DB to be set up. |
714 |
if [ "$op" = request ] |
728 |
if [ "$op" = request ] |
715 |
then |
729 |
then |