View | Details | Raw Unified | Return to bug 26290
Collapse All | Expand All

(-)a/debian/docs/koha-create.xml (+56 lines)
Lines 43-48 Link Here
43
      <arg><option>--upload-path</option> directory</arg>
43
      <arg><option>--upload-path</option> directory</arg>
44
      <arg><option>--tmp-path</option> directory</arg>
44
      <arg><option>--tmp-path</option> directory</arg>
45
      <arg><option>--letsencrypt</option></arg>
45
      <arg><option>--letsencrypt</option></arg>
46
      <arg><option>--smtp-host</option> host</arg>
47
      <arg><option>--smtp-port</option> port</arg>
48
      <arg><option>--smtp-timeout</option> n</arg>
49
      <arg><option>--smtp-ssl-mode</option> disabled|ssl|starttls</arg>
50
      <arg><option>--smtp-user-name</option> user</arg>
51
      <arg><option>--smtp-password</option>  pass</arg>
52
      <arg><option>--smtp-debug</option></arg>
46
      <arg><option>--help</option>|<option>-h</option></arg>
53
      <arg><option>--help</option>|<option>-h</option></arg>
47
54
48
      <arg choice="req" rep="norepeat"><replaceable>instancename</replaceable></arg>
55
      <arg choice="req" rep="norepeat"><replaceable>instancename</replaceable></arg>
Lines 209-214 Link Here
209
      </listitem>
216
      </listitem>
210
    </varlistentry>
217
    </varlistentry>
211
218
219
    <varlistentry>
220
      <term><option>--smtp-host</option></term>
221
      <listitem>
222
        <para>Specify the SMTP server <option>hostname</option>. (default: localhost)</para>
223
      </listitem>
224
    </varlistentry>
225
226
    <varlistentry>
227
      <term><option>--smtp-port</option></term>
228
      <listitem>
229
        <para>Specify the SMTP server <option>port</option>. (default: 25)</para>
230
      </listitem>
231
    </varlistentry>
232
233
    <varlistentry>
234
      <term><option>--smtp-timeout</option></term>
235
      <listitem>
236
        <para>Timeout for outbound SMTP connections. (default: 120)</para>
237
      </listitem>
238
    </varlistentry>
239
240
    <varlistentry>
241
      <term><option>--smtp-ssl-mode</option></term>
242
      <listitem>
243
        <para>Set the SSL mode. Options are <option>disabled</option> (default), <option>ssl</option> and <option>starttls</option>.</para>
244
      </listitem>
245
    </varlistentry>
246
247
    <varlistentry>
248
      <term><option>--smtp-user-name</option></term>
249
      <listitem>
250
        <para>Specify the user name to use for SMTP. (default: empty)</para>
251
      </listitem>
252
    </varlistentry>
253
254
    <varlistentry>
255
      <term><option>--smtp-password</option></term>
256
      <listitem>
257
        <para>Specify the password for SMTP. (default: empty)</para>
258
      </listitem>
259
    </varlistentry>
260
261
    <varlistentry>
262
      <term><option>--smtp-debug</option></term>
263
      <listitem>
264
        <para>Enable debug mode.</para>
265
      </listitem>
266
    </varlistentry>
267
212
    <varlistentry>
268
    <varlistentry>
213
      <term><option>--help</option>,<option>-h</option></term>
269
      <term><option>--help</option>,<option>-h</option></term>
214
      <listitem>
270
      <listitem>
(-)a/debian/scripts/koha-create (-1 / +77 lines)
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
(-)a/debian/templates/koha-conf-site.xml.in (+10 lines)
Lines 440-444 __END_SRU_PUBLICSERVER__ Link Here
440
 -->
440
 -->
441
 </koha_xslt_security>
441
 </koha_xslt_security>
442
442
443
 <smtp_server>
444
    <host>__SMTP_HOST__</host>
445
    <port>__SMTP_PORT__</port>
446
    <timeout>__SMTP_TIMEOUT__</timeout>
447
    <ssl_mode>__SMTP_SSL_MODE__</ssl_mode>
448
    <user_name>__SMTP_USER_NAME__</user_name>
449
    <password>__SMTP_PASSWORD__</password>
450
    <debug>__SMTP_DEBUG__</debug>
451
 </smtp_server>
452
443
</config>
453
</config>
444
</yazgfs>
454
</yazgfs>
(-)a/etc/koha-conf.xml (-1 / +10 lines)
Lines 260-264 __PAZPAR2_TOGGLE_XML_POST__ Link Here
260
 -->
260
 -->
261
 </koha_xslt_security>
261
 </koha_xslt_security>
262
262
263
 <smtp_server>
264
    <host>localhost</host>
265
    <port>25</port>
266
    <timeout>120</timeout>
267
    <ssl_mode>disabled</ssl_mode>
268
    <user_name></user_name>
269
    <password></password>
270
    <debug>0</debug>
271
 </smtp_server>
272
263
</config>
273
</config>
264
</yazgfs>
274
</yazgfs>
265
- 

Return to bug 26290