Lines 70-75
Options:
Link Here
|
70 |
--database dbname Enforce the use of the specified DB name (64 char limit) |
70 |
--database dbname Enforce the use of the specified DB name (64 char limit) |
71 |
--adminuser n Explicit the admin user ID in the DB. Relevant in |
71 |
--adminuser n Explicit the admin user ID in the DB. Relevant in |
72 |
conjunction with --defaultsql and --populate-db. |
72 |
conjunction with --defaultsql and --populate-db. |
|
|
73 |
--template-cache-dir Set a user defined template_cache_dir. It defaults to |
74 |
/var/cache/koha/<instance>/templates |
73 |
--upload-path dir Set a user defined upload_path. It defaults to |
75 |
--upload-path dir Set a user defined upload_path. It defaults to |
74 |
/var/lib/koha/<instance>/uploads |
76 |
/var/lib/koha/<instance>/uploads |
75 |
--letsencrypt Set up a https-only site with letsencrypt certificates |
77 |
--letsencrypt Set up a https-only site with letsencrypt certificates |
Lines 113-118
generate_config_file() {
Link Here
|
113 |
-e "s/__DB_PASS__/$mysqlpwd/g" \ |
115 |
-e "s/__DB_PASS__/$mysqlpwd/g" \ |
114 |
-e "s/__UNIXUSER__/$username/g" \ |
116 |
-e "s/__UNIXUSER__/$username/g" \ |
115 |
-e "s/__UNIXGROUP__/$username/g" \ |
117 |
-e "s/__UNIXGROUP__/$username/g" \ |
|
|
118 |
-e "s#__TEMPLATE_CACHE_DIR__#$TEMPLATE_CACHE_DIR#g" \ |
116 |
-e "s#__UPLOAD_PATH__#$UPLOAD_PATH#g" \ |
119 |
-e "s#__UPLOAD_PATH__#$UPLOAD_PATH#g" \ |
117 |
-e "s/__LOG_DIR__/\/var\/log\/koha\/$name/g" \ |
120 |
-e "s/__LOG_DIR__/\/var\/log\/koha\/$name/g" \ |
118 |
-e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \ |
121 |
-e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \ |
Lines 405-410
DEFAULT_MEMCACHED_PREFIX="koha_"
Link Here
|
405 |
UPLOAD_PATH_BASE="/var/lib/koha" |
408 |
UPLOAD_PATH_BASE="/var/lib/koha" |
406 |
UPLOAD_DIR="uploads" |
409 |
UPLOAD_DIR="uploads" |
407 |
UPLOAD_PATH="" |
410 |
UPLOAD_PATH="" |
|
|
411 |
# cache base dir |
412 |
CACHE_DIR_BASE="/var/cache/koha" |
408 |
# Generate a randomizaed API secret |
413 |
# Generate a randomizaed API secret |
409 |
API_SECRET="$(pwgen -s 64 1)" |
414 |
API_SECRET="$(pwgen -s 64 1)" |
410 |
# SRU server variables |
415 |
# SRU server variables |
Lines 433-439
fi
Link Here
|
433 |
|
438 |
|
434 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
439 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
435 |
|
440 |
|
436 |
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:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,upload-path:,letsencrypt, \ |
441 |
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:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,template-cache-dir:,upload-path:,letsencrypt, \ |
437 |
-n "$0" -- "$@"` |
442 |
-n "$0" -- "$@"` |
438 |
|
443 |
|
439 |
# Note the quotes around `$TEMP': they are essential! |
444 |
# Note the quotes around `$TEMP': they are essential! |
Lines 450-455
CLO_MEMCACHED_SERVERS=""
Link Here
|
450 |
CLO_MEMCACHED_PREFIX="" |
455 |
CLO_MEMCACHED_PREFIX="" |
451 |
CLO_UPLOAD_PATH="" |
456 |
CLO_UPLOAD_PATH="" |
452 |
CLO_LETSENCRYPT="" |
457 |
CLO_LETSENCRYPT="" |
|
|
458 |
CLO_TEMPLATE_CACHE_DIR="" |
453 |
|
459 |
|
454 |
while true ; do |
460 |
while true ; do |
455 |
case "$1" in |
461 |
case "$1" in |
Lines 491-496
while true ; do
Link Here
|
491 |
ENABLE_SRU="yes" ; shift ;; |
497 |
ENABLE_SRU="yes" ; shift ;; |
492 |
--sru-port) |
498 |
--sru-port) |
493 |
SRU_SERVER_PORT="$2" ; shift 2 ;; |
499 |
SRU_SERVER_PORT="$2" ; shift 2 ;; |
|
|
500 |
--template-cache-dir) |
501 |
CLO_TEMPLATE_CACHE_DIR="$2" ; shift 2 ;; |
494 |
--upload-path) |
502 |
--upload-path) |
495 |
CLO_UPLOAD_PATH="$2" ; shift 2 ;; |
503 |
CLO_UPLOAD_PATH="$2" ; shift 2 ;; |
496 |
--letsencrypt) |
504 |
--letsencrypt) |
Lines 592-597
else
Link Here
|
592 |
MEMCACHED_PREFIX="" |
600 |
MEMCACHED_PREFIX="" |
593 |
fi |
601 |
fi |
594 |
|
602 |
|
|
|
603 |
# Set template cache dir |
604 |
if [ "$CLO_TEMPLATE_CACHE_DIR" != "" ]; then |
605 |
TEMPLATE_CACHE_DIR="$CLO_TEMPLATE_CACHE_DIR" |
606 |
else |
607 |
TEMPLATE_CACHE_DIR="$CACHE_DIR_BASE/$name/templates" |
608 |
fi |
609 |
|
595 |
# Are we root? If not, the mod_rewrite check will fail and be confusing, so |
610 |
# Are we root? If not, the mod_rewrite check will fail and be confusing, so |
596 |
# we look into this first. |
611 |
# we look into this first. |
597 |
if [[ $UID -ne 0 ]] |
612 |
if [[ $UID -ne 0 ]] |
Lines 727-733
eof
Link Here
|
727 |
generate_config_file zebra.passwd.in \ |
742 |
generate_config_file zebra.passwd.in \ |
728 |
"/etc/koha/sites/$name/zebra.passwd" |
743 |
"/etc/koha/sites/$name/zebra.passwd" |
729 |
|
744 |
|
730 |
|
|
|
731 |
# Create a GPG-encrypted file for requesting a DB to be set up. |
745 |
# Create a GPG-encrypted file for requesting a DB to be set up. |
732 |
if [ "$op" = request ] |
746 |
if [ "$op" = request ] |
733 |
then |
747 |
then |