Lines 76-81
Options:
Link Here
|
76 |
--tmp-path dir Set a user defined tmp_path. It defaults to |
76 |
--tmp-path dir Set a user defined tmp_path. It defaults to |
77 |
/var/lib/koha/<instance>/tmp |
77 |
/var/lib/koha/<instance>/tmp |
78 |
--letsencrypt Set up a https-only site with letsencrypt certificates |
78 |
--letsencrypt Set up a https-only site with letsencrypt certificates |
|
|
79 |
--smtp-host host SMTP host name |
80 |
--smtp-port NN SMTP port |
81 |
--smtp-timeout NN Connection timeout in seconds |
82 |
--smtp-ssl-mode mode SSL mode. Options are 'disabled' (default), 'ssl' and 'starttls'. |
83 |
--smtp-user-name user User name to be used on SMTP auth |
84 |
--smtp-password pass Password to authenticate SMTP |
85 |
--smtp-debug Enable debug mode for SMTP |
79 |
--help,-h Show this help. |
86 |
--help,-h Show this help. |
80 |
|
87 |
|
81 |
Note: the instance name cannot be longer that 11 chars. |
88 |
Note: the instance name cannot be longer that 11 chars. |
Lines 118-123
generate_config_file() {
Link Here
|
118 |
-e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \ |
125 |
-e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \ |
119 |
-e "s/__MEMCACHED_NAMESPACE__/$MEMCACHED_NAMESPACE/g" \ |
126 |
-e "s/__MEMCACHED_NAMESPACE__/$MEMCACHED_NAMESPACE/g" \ |
120 |
-e "s/__MEMCACHED_SERVERS__/$MEMCACHED_SERVERS/g" \ |
127 |
-e "s/__MEMCACHED_SERVERS__/$MEMCACHED_SERVERS/g" \ |
|
|
128 |
-e "s/__SMTP_HOST__/$SMTP_HOST/g" \ |
129 |
-e "s/__SMTP_PORT__/$SMTP_PORT/g" \ |
130 |
-e "s/__SMTP_TIMEOUT__/$SMTP_TIMEOUT/g" \ |
131 |
-e "s/__SMTP_SSL_MODE__/$SMTP_SSL_MODE/g" \ |
132 |
-e "s/__SMTP_USER_NAME__/$SMTP_USER_NAME/g" \ |
133 |
-e "s/__SMTP_PASSWORD__/$SMTP_PASSWORD/g" \ |
134 |
-e "s/__SMTP_DEBUG__/$SMTP_DEBUG/g" \ |
121 |
"/etc/koha/$1" > "$2" |
135 |
"/etc/koha/$1" > "$2" |
122 |
|
136 |
|
123 |
} |
137 |
} |
Lines 244-249
set_memcached()
Link Here
|
244 |
|
258 |
|
245 |
} |
259 |
} |
246 |
|
260 |
|
|
|
261 |
set_smtp() |
262 |
{ |
263 |
if [ "$CLO_SMTP_HOST" != "" ]; then |
264 |
SMTP_HOST=$CLO_SMTP_HOST |
265 |
fi |
266 |
|
267 |
if [ "$CLO_SMTP_PORT" != "" ]; then |
268 |
SMTP_PORT=$CLO_SMTP_PORT |
269 |
fi |
270 |
|
271 |
if [ "$CLO_SMTP_TIMEOUT" != "" ]; then |
272 |
SMTP_TIMEOUT=$CLO_SMTP_TIMEOUT |
273 |
fi |
274 |
|
275 |
if [ "$CLO_SMTP_SSL_MODE" != "" ]; then |
276 |
SMTP_SSL_MODE=$CLO_SMTP_SSL_MODE |
277 |
fi |
278 |
|
279 |
if [ "$CLO_SMTP_USER_NAME" != "" ]; then |
280 |
SMTP_USER_NAME=$CLO_SMTP_USER_NAME |
281 |
fi |
282 |
|
283 |
if [ "$CLO_SMTP_PASSWORD" != "" ]; then |
284 |
SMTP_PASSWORD=$CLO_SMTP_PASSWORD |
285 |
fi |
286 |
|
287 |
if [ "$CLO_SMTP_DEBUG" != "" ]; then |
288 |
SMTP_DEBUG=$CLO_SMTP_DEBUG |
289 |
fi |
290 |
} |
291 |
|
247 |
set_upload_path() |
292 |
set_upload_path() |
248 |
{ |
293 |
{ |
249 |
local instance="$1" |
294 |
local instance="$1" |
Lines 341-346
ZEBRA_LANGUAGE="en"
Link Here
|
341 |
ADMINUSER="1" |
386 |
ADMINUSER="1" |
342 |
PASSWDFILE="/etc/koha/passwd" |
387 |
PASSWDFILE="/etc/koha/passwd" |
343 |
|
388 |
|
|
|
389 |
# SMTP config |
390 |
SMTP_HOST="localhost" |
391 |
SMTP_PORT="25" |
392 |
SMTP_TIMEOUT="120" |
393 |
SMTP_SSL_MODE="disabled" |
394 |
SMTP_USER_NAME="" |
395 |
SMTP_PASSWORD="" |
396 |
SMTP_DEBUG="0" |
397 |
|
344 |
# memcached variables |
398 |
# memcached variables |
345 |
USE_MEMCACHED="yes" |
399 |
USE_MEMCACHED="yes" |
346 |
MEMCACHED_SERVERS="" |
400 |
MEMCACHED_SERVERS="" |
Lines 380-386
fi
Link Here
|
380 |
|
434 |
|
381 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
435 |
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) |
382 |
|
436 |
|
383 |
TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,elasticsearch-server:,adminuser:,memcached-servers:,memcached-prefix:,template-cache-dir:,timezone:,upload-path:,tmp-path:,letsencrypt, \ |
437 |
TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,elasticsearch-server:,adminuser:,memcached-servers:,memcached-prefix:,template-cache-dir:,timezone:,upload-path:,tmp-path:,smtp-host:,smtp-port,smtp-timeout:,smtp-ssl-mode:smtp-user-name:,smtp-password:,smtp-debug,letsencrypt, \ |
384 |
-n "$0" -- "$@"` |
438 |
-n "$0" -- "$@"` |
385 |
|
439 |
|
386 |
# Note the quotes around `$TEMP': they are essential! |
440 |
# Note the quotes around `$TEMP': they are essential! |
Lines 399-404
CLO_TMP_PATH=""
Link Here
|
399 |
CLO_LETSENCRYPT="" |
453 |
CLO_LETSENCRYPT="" |
400 |
CLO_TEMPLATE_CACHE_DIR="" |
454 |
CLO_TEMPLATE_CACHE_DIR="" |
401 |
CLO_TIMEZONE="" |
455 |
CLO_TIMEZONE="" |
|
|
456 |
CLO_SMTP_HOST="" |
457 |
CLO_SMTP_PORT="" |
458 |
CLO_SMTP_TIMEOUT="" |
459 |
CLO_SMTP_SSL_MODE="" |
460 |
CLO_SMTP_USER_NAME="" |
461 |
CLO_SMTP_PASSWORD="" |
462 |
CLO_SMTP_DEBUG="" |
402 |
|
463 |
|
403 |
while true ; do |
464 |
while true ; do |
404 |
case "$1" in |
465 |
case "$1" in |
Lines 434-439
while true ; do
Link Here
|
434 |
CLO_ADMINUSER="$2" ; shift 2 ;; |
495 |
CLO_ADMINUSER="$2" ; shift 2 ;; |
435 |
--enable-sru) |
496 |
--enable-sru) |
436 |
ENABLE_SRU="yes" ; shift ;; |
497 |
ENABLE_SRU="yes" ; shift ;; |
|
|
498 |
--smtp-debug) |
499 |
CLO_SMTP_DEBUG="1" ; shift ;; |
500 |
--smtp-host) |
501 |
CLO_SMTP_HOST="$2" ; shift 2 ;; |
502 |
--smtp-port) |
503 |
CLO_SMTP_PORT="$2" ; shift 2 ;; |
504 |
--smtp-timeout) |
505 |
CLO_SMTP_TIMEOUT="$2" ; shift 2 ;; |
506 |
--smtp-ssl-mode) |
507 |
CLO_SMTP_SSL_MODE="$2" ; shift 2 ;; |
508 |
--smtp-user-name) |
509 |
CLO_SMTP_USER_NAME="$2" ; shift 2 ;; |
510 |
--smtp-password) |
511 |
CLO_SMTP_PASSWORD="$2" ; shift 2 ;; |
437 |
--sru-port) |
512 |
--sru-port) |
438 |
SRU_SERVER_PORT="$2" ; shift 2 ;; |
513 |
SRU_SERVER_PORT="$2" ; shift 2 ;; |
439 |
--template-cache-dir) |
514 |
--template-cache-dir) |
Lines 507-512
fi
Link Here
|
507 |
|
582 |
|
508 |
name="$1" |
583 |
name="$1" |
509 |
|
584 |
|
|
|
585 |
set_smtp |
510 |
set_upload_path $name |
586 |
set_upload_path $name |
511 |
set_tmp_path $name |
587 |
set_tmp_path $name |
512 |
|
588 |
|