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 406-411
DEFAULT_MEMCACHED_PREFIX="koha_"
Link Here
|
406 |
UPLOAD_PATH_BASE="/var/lib/koha" |
409 |
UPLOAD_PATH_BASE="/var/lib/koha" |
407 |
UPLOAD_DIR="uploads" |
410 |
UPLOAD_DIR="uploads" |
408 |
UPLOAD_PATH="" |
411 |
UPLOAD_PATH="" |
|
|
412 |
# cache base dir |
413 |
CACHE_DIR_BASE="/var/cache/koha" |
409 |
# Generate a randomizaed API secret |
414 |
# Generate a randomizaed API secret |
410 |
API_SECRET="$(pwgen -s 64 1)" |
415 |
API_SECRET="$(pwgen -s 64 1)" |
411 |
# SRU server variables |
416 |
# SRU server variables |
Lines 434-440
fi
Link Here
|
434 |
|
439 |
|
435 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
440 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
436 |
|
441 |
|
437 |
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, \ |
442 |
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, \ |
438 |
-n "$0" -- "$@"` |
443 |
-n "$0" -- "$@"` |
439 |
|
444 |
|
440 |
# Note the quotes around `$TEMP': they are essential! |
445 |
# Note the quotes around `$TEMP': they are essential! |
Lines 451-456
CLO_MEMCACHED_SERVERS=""
Link Here
|
451 |
CLO_MEMCACHED_PREFIX="" |
456 |
CLO_MEMCACHED_PREFIX="" |
452 |
CLO_UPLOAD_PATH="" |
457 |
CLO_UPLOAD_PATH="" |
453 |
CLO_LETSENCRYPT="" |
458 |
CLO_LETSENCRYPT="" |
|
|
459 |
CLO_TEMPLATE_CACHE_DIR="" |
454 |
|
460 |
|
455 |
while true ; do |
461 |
while true ; do |
456 |
case "$1" in |
462 |
case "$1" in |
Lines 492-497
while true ; do
Link Here
|
492 |
ENABLE_SRU="yes" ; shift ;; |
498 |
ENABLE_SRU="yes" ; shift ;; |
493 |
--sru-port) |
499 |
--sru-port) |
494 |
SRU_SERVER_PORT="$2" ; shift 2 ;; |
500 |
SRU_SERVER_PORT="$2" ; shift 2 ;; |
|
|
501 |
--template-cache-dir) |
502 |
CLO_TEMPLATE_CACHE_DIR="$2" ; shift 2 ;; |
495 |
--upload-path) |
503 |
--upload-path) |
496 |
CLO_UPLOAD_PATH="$2" ; shift 2 ;; |
504 |
CLO_UPLOAD_PATH="$2" ; shift 2 ;; |
497 |
--letsencrypt) |
505 |
--letsencrypt) |
Lines 593-598
else
Link Here
|
593 |
MEMCACHED_PREFIX="" |
601 |
MEMCACHED_PREFIX="" |
594 |
fi |
602 |
fi |
595 |
|
603 |
|
|
|
604 |
# Set template cache dir |
605 |
if [ "$CLO_TEMPLATE_CACHE_DIR" != "" ]; then |
606 |
TEMPLATE_CACHE_DIR="$CLO_TEMPLATE_CACHE_DIR" |
607 |
else |
608 |
TEMPLATE_CACHE_DIR="$CACHE_DIR_BASE/$name/templates" |
609 |
fi |
610 |
|
596 |
# Are we root? If not, the mod_rewrite check will fail and be confusing, so |
611 |
# Are we root? If not, the mod_rewrite check will fail and be confusing, so |
597 |
# we look into this first. |
612 |
# we look into this first. |
598 |
if [[ $UID -ne 0 ]] |
613 |
if [[ $UID -ne 0 ]] |
Lines 728-734
eof
Link Here
|
728 |
generate_config_file zebra.passwd.in \ |
743 |
generate_config_file zebra.passwd.in \ |
729 |
"/etc/koha/sites/$name/zebra.passwd" |
744 |
"/etc/koha/sites/$name/zebra.passwd" |
730 |
|
745 |
|
731 |
|
|
|
732 |
# Create a GPG-encrypted file for requesting a DB to be set up. |
746 |
# Create a GPG-encrypted file for requesting a DB to be set up. |
733 |
if [ "$op" = request ] |
747 |
if [ "$op" = request ] |
734 |
then |
748 |
then |