| 
      
            Lines 83-88
          Options:
      
      
        Link Here
      
     | 
  
        
          | 83 | 
            --smtp-user-name user     User name to be used on SMTP auth  | 
          83 | 
            --smtp-user-name user     User name to be used on SMTP auth  | 
        
        
          | 84 | 
            --smtp-password  pass     Password to authenticate SMTP  | 
          84 | 
            --smtp-password  pass     Password to authenticate SMTP  | 
        
        
          | 85 | 
            --smtp-debug              Enable debug mode for SMTP  | 
          85 | 
            --smtp-debug              Enable debug mode for SMTP  | 
        
            
               | 
               | 
              86 | 
               | 
            
            
              | 87 | 
                --mb-host host            RabbitMQ host name (default: localhost)  | 
            
            
              | 88 | 
                --mb-port NN              RabbitMQ port (default: 61613)  | 
            
            
              | 89 | 
                --mb-user user            RabbitMQ user (default: guest)  | 
            
            
              | 90 | 
                --mb-pass pass            RabbitMQ password (default: guest)  | 
            
            
              | 91 | 
                --mb-vhost vhost          RabbitMQ vhost (default: koha_<instance>)  | 
            
            
              | 92 | 
               | 
            
        
          | 86 | 
            --help,-h                 Show this help.  | 
          93 | 
            --help,-h                 Show this help.  | 
        
        
          | 87 | 
           | 
          94 | 
           | 
        
        
          | 88 | 
          Note: the instance name cannot be longer that 11 chars.  | 
          95 | 
          Note: the instance name cannot be longer that 11 chars.  | 
        
  
    | 
      
            Lines 132-137
          generate_config_file() {
      
      
        Link Here
      
     | 
  
        
          | 132 | 
                  -e "s/__SMTP_USER_NAME__/$SMTP_USER_NAME/g" \  | 
          139 | 
                  -e "s/__SMTP_USER_NAME__/$SMTP_USER_NAME/g" \  | 
        
        
          | 133 | 
                  -e "s/__SMTP_PASSWORD__/$SMTP_PASSWORD/g" \  | 
          140 | 
                  -e "s/__SMTP_PASSWORD__/$SMTP_PASSWORD/g" \  | 
        
        
          | 134 | 
                  -e "s/__SMTP_DEBUG__/$SMTP_DEBUG/g" \  | 
          141 | 
                  -e "s/__SMTP_DEBUG__/$SMTP_DEBUG/g" \  | 
        
            
               | 
               | 
              142 | 
                      -e "s/__MESSAGE_BROKER_HOST__/$MESSAGE_BROKER_HOST/g" \  | 
            
            
              | 143 | 
                      -e "s/__MESSAGE_BROKER_PORT__/$MESSAGE_BROKER_PORT/g" \  | 
            
            
              | 144 | 
                      -e "s/__MESSAGE_BROKER_USER__/$MESSAGE_BROKER_USER/g" \  | 
            
            
              | 145 | 
                      -e "s/__MESSAGE_BROKER_PASS__/$MESSAGE_BROKER_PASS/g" \  | 
            
            
              | 146 | 
                      -e "s/__MESSAGE_BROKER_VHOST__/$MESSAGE_BROKER_VHOST/g" \  | 
            
        
          | 135 | 
                  "/etc/koha/$1" > "$2"  | 
          147 | 
                  "/etc/koha/$1" > "$2"  | 
        
        
          | 136 | 
           | 
          148 | 
           | 
        
        
          | 137 | 
          }  | 
          149 | 
          }  | 
        
  
    | 
      
            Lines 289-294
          set_smtp()
      
      
        Link Here
      
     | 
  
        
          | 289 | 
              fi  | 
          301 | 
              fi  | 
        
        
          | 290 | 
          }  | 
          302 | 
          }  | 
        
        
          | 291 | 
           | 
          303 | 
           | 
        
            
               | 
               | 
              304 | 
              set_message_broker()  | 
            
            
              | 305 | 
              { | 
            
            
              | 306 | 
                  local instance="$1"  | 
            
            
              | 307 | 
               | 
            
            
              | 308 | 
                  if [ "$CLO_MESSAGE_BROKER_HOST" != "" ]; then  | 
            
            
              | 309 | 
                      MESSAGE_BROKER_HOST=$CLO_MESSAGE_BROKER_HOST  | 
            
            
              | 310 | 
                  fi  | 
            
            
              | 311 | 
               | 
            
            
              | 312 | 
                  if [ "$CLO_MESSAGE_BROKER_PORT" != "" ]; then  | 
            
            
              | 313 | 
                      MESSAGE_BROKER_PORT=$CLO_MESSAGE_BROKER_PORT  | 
            
            
              | 314 | 
                  fi  | 
            
            
              | 315 | 
               | 
            
            
              | 316 | 
                  if [ "$CLO_MESSAGE_BROKER_USER" != "" ]; then  | 
            
            
              | 317 | 
                      MESSAGE_BROKER_USER=$CLO_MESSAGE_BROKER_USER  | 
            
            
              | 318 | 
                  fi  | 
            
            
              | 319 | 
               | 
            
            
              | 320 | 
                  if [ "$CLO_MESSAGE_BROKER_PASS" != "" ]; then  | 
            
            
              | 321 | 
                      MESSAGE_BROKER_PASS=$CLO_MESSAGE_BROKER_PASS  | 
            
            
              | 322 | 
                  fi  | 
            
            
              | 323 | 
               | 
            
            
              | 324 | 
                  if [ "$CLO_MESSAGE_BROKER_VHOST" != "" ]; then  | 
            
            
              | 325 | 
                      MESSAGE_BROKER_VHOST=$CLO_MESSAGE_BROKER_VHOST  | 
            
            
              | 326 | 
                  else  | 
            
            
              | 327 | 
                      MESSAGE_BROKER_VHOST="$DEFAULT_MESSAGE_BROKER_PREFIX$instance"  | 
            
            
              | 328 | 
                  fi  | 
            
            
              | 329 | 
              }  | 
            
            
              | 330 | 
               | 
            
        
          | 292 | 
          set_upload_path()  | 
          331 | 
          set_upload_path()  | 
        
        
          | 293 | 
          { | 
          332 | 
          { | 
        
        
          | 294 | 
              local instance="$1"  | 
          333 | 
              local instance="$1"  | 
        
  
    | 
      
            Lines 395-400
          SMTP_USER_NAME=""
      
      
        Link Here
      
     | 
  
        
          | 395 | 
          SMTP_PASSWORD=""  | 
          434 | 
          SMTP_PASSWORD=""  | 
        
        
          | 396 | 
          SMTP_DEBUG="0"  | 
          435 | 
          SMTP_DEBUG="0"  | 
        
        
          | 397 | 
           | 
          436 | 
           | 
        
            
               | 
               | 
              437 | 
              # Message broker (a.k.a. RabbitMQ) config  | 
            
            
              | 438 | 
              DEFAULT_MESSAGE_BROKER_PREFIX="koha_"  | 
            
            
              | 439 | 
              MESSAGE_BROKER_HOST="localhost"  | 
            
            
              | 440 | 
              MESSAGE_BROKER_PORT="61613"  | 
            
            
              | 441 | 
              MESSAGE_BROKER_USER="guest"  | 
            
            
              | 442 | 
              MESSAGE_BROKER_PASS="guest"  | 
            
            
              | 443 | 
              MESSAGE_BROKER_VHOST=""  | 
            
            
              | 444 | 
               | 
            
        
          | 398 | 
          # memcached variables  | 
          445 | 
          # memcached variables  | 
        
        
          | 399 | 
          USE_MEMCACHED="yes"  | 
          446 | 
          USE_MEMCACHED="yes"  | 
        
        
          | 400 | 
          MEMCACHED_SERVERS=""  | 
          447 | 
          MEMCACHED_SERVERS=""  | 
        
  
    | 
      
            Lines 434-440
          fi
      
      
        Link Here
      
     | 
  
        
          | 434 | 
           | 
          481 | 
           | 
        
        
          | 435 | 
          [ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )  | 
          482 | 
          [ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )  | 
        
        
          | 436 | 
           | 
          483 | 
           | 
        
          
            
              | 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, \  | 
              484 | 
              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,mb-host:,mb-port:,mb-user:,mb-pass:,mb-vhost:,letsencrypt, \  | 
            
        
          | 438 | 
               -n "$0" -- "$@"`  | 
          485 | 
               -n "$0" -- "$@"`  | 
        
        
          | 439 | 
           | 
          486 | 
           | 
        
        
          | 440 | 
          # Note the quotes around `$TEMP': they are essential!  | 
          487 | 
          # Note the quotes around `$TEMP': they are essential!  | 
        
  
    | 
      
            Lines 461-466
          CLO_SMTP_USER_NAME=""
      
      
        Link Here
      
     | 
  
        
          | 461 | 
          CLO_SMTP_PASSWORD=""  | 
          508 | 
          CLO_SMTP_PASSWORD=""  | 
        
        
          | 462 | 
          CLO_SMTP_DEBUG=""  | 
          509 | 
          CLO_SMTP_DEBUG=""  | 
        
        
          | 463 | 
           | 
          510 | 
           | 
        
            
               | 
               | 
              511 | 
              CLO_MESSAGE_BROKER_HOST=""  | 
            
            
              | 512 | 
              CLO_MESSAGE_BROKER_PORT=""  | 
            
            
              | 513 | 
              CLO_MESSAGE_BROKER_USER=""  | 
            
            
              | 514 | 
              CLO_MESSAGE_BROKER_PASS=""  | 
            
            
              | 515 | 
              CLO_MESSAGE_BROKER_VHOST=""  | 
            
            
              | 516 | 
               | 
            
        
          | 464 | 
          while true ; do  | 
          517 | 
          while true ; do  | 
        
        
          | 465 | 
              case "$1" in  | 
          518 | 
              case "$1" in  | 
        
        
          | 466 | 
                  -c|--create-db)  | 
          519 | 
                  -c|--create-db)  | 
        
  
    | 
      
            Lines 495-500
          while true ; do
      
      
        Link Here
      
     | 
  
        
          | 495 | 
                      CLO_ADMINUSER="$2" ; shift 2 ;;  | 
          548 | 
                      CLO_ADMINUSER="$2" ; shift 2 ;;  | 
        
        
          | 496 | 
                  --enable-sru)  | 
          549 | 
                  --enable-sru)  | 
        
        
          | 497 | 
                      ENABLE_SRU="yes" ; shift ;;  | 
          550 | 
                      ENABLE_SRU="yes" ; shift ;;  | 
        
            
               | 
               | 
              551 | 
                      --mb-host)  | 
            
            
              | 552 | 
                          CLO_MESSAGE_BROKER_HOST="$2" ; shift 2 ;;  | 
            
            
              | 553 | 
                      --mb-port)  | 
            
            
              | 554 | 
                          CLO_MESSAGE_BROKER_PORT="$2" ; shift 2 ;;  | 
            
            
              | 555 | 
                      --mb-user)  | 
            
            
              | 556 | 
                          CLO_MESSAGE_BROKER_USER="$2" ; shift 2 ;;  | 
            
            
              | 557 | 
                      --mb-pass)  | 
            
            
              | 558 | 
                          CLO_MESSAGE_BROKER_PASS="$2" ; shift 2 ;;  | 
            
            
              | 559 | 
                      --mb-vhost)  | 
            
            
              | 560 | 
                          CLO_MESSAGE_BROKER_VHOST="$2" ; shift 2 ;;  | 
            
        
          | 498 | 
                  --smtp-debug)  | 
          561 | 
                  --smtp-debug)  | 
        
        
          | 499 | 
                      CLO_SMTP_DEBUG="1" ; shift ;;  | 
          562 | 
                      CLO_SMTP_DEBUG="1" ; shift ;;  | 
        
        
          | 500 | 
                  --smtp-host)  | 
          563 | 
                  --smtp-host)  | 
        
  
    | 
      
            Lines 607-612
          else
      
      
        Link Here
      
     | 
  
        
          | 607 | 
              set_memcached $name  | 
          670 | 
              set_memcached $name  | 
        
        
          | 608 | 
          fi  | 
          671 | 
          fi  | 
        
        
          | 609 | 
           | 
          672 | 
           | 
        
            
               | 
               | 
              673 | 
              set_message_broker $name  | 
            
            
              | 674 | 
               | 
            
        
          | 610 | 
          # Set template cache dir  | 
          675 | 
          # Set template cache dir  | 
        
        
          | 611 | 
          if [ "$CLO_TEMPLATE_CACHE_DIR" != "" ]; then  | 
          676 | 
          if [ "$CLO_TEMPLATE_CACHE_DIR" != "" ]; then  | 
        
        
          | 612 | 
              TEMPLATE_CACHE_DIR="$CLO_TEMPLATE_CACHE_DIR"  | 
          677 | 
              TEMPLATE_CACHE_DIR="$CLO_TEMPLATE_CACHE_DIR"  | 
        
            
              | 613 | 
              -   | 
               | 
               |