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

(-)a/Makefile.PL (-3 / +96 lines)
Lines 471-476 System user account that will own Koha's files. Link Here
471
471
472
System group that will own Koha's files.
472
System group that will own Koha's files.
473
473
474
=item SMTP_HOST
475
476
SMTP server host name (default: localhost)
477
478
=item SMTP_PORT
479
480
SMTP server port (default: 25)
481
482
=item SMTP_TIMEOUT
483
484
Connection timeour in seconds (default: 120)
485
486
=item SMTP_SSL_MODE
487
488
SSL mode. Options are 'disabled' (default), 'ssl' and 'starttls'
489
490
=item SMTP_USER_NAME
491
492
SMTP authentication user name
493
494
=item SMTP_PASSWORD
495
496
SMTP authentication password
497
498
=item SMTP_DEBUG
499
500
Enable debug mode for SMTP (default: no)
501
474
=back
502
=back
475
503
476
=cut
504
=cut
Lines 511-517 my %config_defaults = ( Link Here
511
  'USE_ELASTICSEARCH'     => 'no',
539
  'USE_ELASTICSEARCH'     => 'no',
512
  'ELASTICSEARCH_SERVERS' => 'localhost:9200',
540
  'ELASTICSEARCH_SERVERS' => 'localhost:9200',
513
  'ELASTICSEARCH_INDEX'  => 'koha',
541
  'ELASTICSEARCH_INDEX'  => 'koha',
514
  'FONT_DIR'          => '/usr/share/fonts/truetype/dejavu'
542
  'FONT_DIR'          => '/usr/share/fonts/truetype/dejavu',
543
  'SMTP_HOST'      => 'localhost',
544
  'SMTP_PORT'      => '25',
545
  'SMTP_TIMEOUT'   => '120',
546
  'SMTP_SSL_MODE'  => 'disabled',
547
  'SMTP_USER_NAME' => '',
548
  'SMTP_PASSWORD'  => '',
549
  'SMTP_DEBUG'     => 'no',
515
);
550
);
516
551
517
# set some default configuration options based on OS
552
# set some default configuration options based on OS
Lines 542-547 my %valid_config_values = ( Link Here
542
  'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
577
  'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
543
  'USE_MEMCACHED'      => { 'yes' => 1, 'no' => 1 },
578
  'USE_MEMCACHED'      => { 'yes' => 1, 'no' => 1 },
544
  'USE_ELASTICSEARCH'  => { 'yes' => 1, 'no' => 1 },
579
  'USE_ELASTICSEARCH'  => { 'yes' => 1, 'no' => 1 },
580
  'SMTP_SSL_MODE'      => { 'disabled' => 1, 'ssl' => 1, 'starttls' => 1 },
581
  'SMTP_DEBUG'         => { 'yes' => 1, 'no' => 1 },
545
);
582
);
546
583
547
# get settings from command-line
584
# get settings from command-line
Lines 570-575 my $cli_koha_font_dir = ""; Link Here
570
my $cli_koha_run_database_tests = "";
607
my $cli_koha_run_database_tests = "";
571
my $cli_koha_install_base = "";
608
my $cli_koha_install_base = "";
572
my $cli_koha_template_cache_dir = "";
609
my $cli_koha_template_cache_dir = "";
610
my $cli_smtp_host      = "";
611
my $cli_smtp_port      = "";
612
my $cli_smtp_timeout   = "";
613
my $cli_smtp_ssl_mode  = "";
614
my $cli_smtp_user_name = "";
615
my $cli_smtp_password  = "";
616
my $cli_smtp_debug     = "";
617
573
Getopt::Long::Configure('pass_through');
618
Getopt::Long::Configure('pass_through');
574
my $results = GetOptions(
619
my $results = GetOptions(
575
    "prev-install-log=s"           => \$koha_install_log,
620
    "prev-install-log=s"           => \$koha_install_log,
Lines 597-602 my $results = GetOptions( Link Here
597
    "run_database_tests=s"         => \$cli_koha_run_database_tests,
642
    "run_database_tests=s"         => \$cli_koha_run_database_tests,
598
    "install_base=s"               => \$cli_koha_install_base,
643
    "install_base=s"               => \$cli_koha_install_base,
599
    "template-cache-dir=s"         => \$cli_koha_template_cache_dir,
644
    "template-cache-dir=s"         => \$cli_koha_template_cache_dir,
645
    "smtp-host=s"                  => \$cli_smtp_host,
646
    "smtp-port=s"                  => \$cli_smtp_port,
647
    "smtp-timeout=s"               => \$cli_smtp_timeout,
648
    "smtp-ssl-mode=s"              => \$cli_smtp_ssl_mode,
649
    "smtp-user-name=s"             => \$cli_smtp_user_name,
650
    "smtp-password=s"              => \$cli_smtp_password,
651
    "smtp-debug"                   => \$cli_smtp_debug,
600
    "help"                         => sub { HelpMessage(0) },
652
    "help"                         => sub { HelpMessage(0) },
601
) or HelpMessage(1);
653
) or HelpMessage(1);
602
654
Lines 685-691 WriteMakefile( Link Here
685
              #VERSION     => strftime('2.9.%Y%m%d%H',gmtime),
737
              #VERSION     => strftime('2.9.%Y%m%d%H',gmtime),
686
              VERSION_FROM => 'kohaversion.pl',
738
              VERSION_FROM => 'kohaversion.pl',
687
              ABSTRACT     => 'Award-winning integrated library system (ILS) and Web OPAC',
739
              ABSTRACT     => 'Award-winning integrated library system (ILS) and Web OPAC',
688
              AUTHOR       => 'Koha Contributors <http://koha-community.org/>',
740
              AUTHOR       => 'Koha Contributors <https://koha-community.org/>',
689
              NO_META      => 1,
741
              NO_META      => 1,
690
              PREREQ_PM    => $koha_pm->prereq_pm,
742
              PREREQ_PM    => $koha_pm->prereq_pm,
691
743
Lines 872-878 sub get_cli_values { Link Here
872
        FONT_DIR                   => $cli_koha_font_dir,
924
        FONT_DIR                   => $cli_koha_font_dir,
873
        RUN_DATABASE_TESTS         => $cli_koha_run_database_tests,
925
        RUN_DATABASE_TESTS         => $cli_koha_run_database_tests,
874
        INSTALL_BASE               => $cli_koha_install_base,
926
        INSTALL_BASE               => $cli_koha_install_base,
875
        TEMPLATE_CACHE_DIR         => $cli_koha_template_cache_dir
927
        TEMPLATE_CACHE_DIR         => $cli_koha_template_cache_dir,
928
        SMTP_HOST                  => $cli_smtp_host,
929
        SMTP_PORT                  => $cli_smtp_port,
930
        SMTP_TIMEOUT               => $cli_smtp_timeout,
931
        SMTP_SSL_MODE              => $cli_smtp_ssl_mode,
932
        SMTP_USER_NAME             => $cli_smtp_user_name,
933
        SMTP_PASSWORD              => $cli_smtp_password,
934
        SMTP_DEBUG                 => (defined $cli_smtp_debug) ? ( $cli_smtp_debug ? 'yes' : 'no' ) : $values->{SMTP_DEBUG},
876
    };
935
    };
877
    foreach my $key (keys %{$map}) {
936
    foreach my $key (keys %{$map}) {
878
        $values->{$key} = $map->{$key} if ($map->{$key});
937
        $values->{$key} = $map->{$key} if ($map->{$key});
Lines 1256-1261 Template cache directory?); Link Here
1256
Path to DejaVu fonts?);
1315
Path to DejaVu fonts?);
1257
  $config{'FONT_DIR'} = _get_value('FONT_DIR', $msg, $defaults->{'FONT_DIR'}, $valid_values, $install_log_values);
1316
  $config{'FONT_DIR'} = _get_value('FONT_DIR', $msg, $defaults->{'FONT_DIR'}, $valid_values, $install_log_values);
1258
1317
1318
  $msg = q(
1319
SMTP settings
1320
You will be able to set your default SMTP configuration.);
1321
  $msg .= q{
1322
SMTP host name?};
1323
  $config{'SMTP_HOST'} = _get_value('SMTP_HOST', $msg, $defaults->{'SMTP_HOST'}, $valid_values, $install_log_values);
1324
1325
  $msg = q{
1326
SMTP port?};
1327
  $config{'SMTP_PORT'} = _get_value('SMTP_PORT', $msg, $defaults->{'SMTP_PORT'}, $valid_values, $install_log_values);
1328
1329
  $msg = q{
1330
SMTP timeout (in seconds)?};
1331
  $config{'SMTP_TIMEOUT'} = _get_value('SMTP_TIMEOUT', $msg, $defaults->{'SMTP_TIMEOUT'}, $valid_values, $install_log_values);
1332
1333
  $msg = q{
1334
SMTP SSL mode?};
1335
  $msg .= _add_valid_values_disp('SMTP_SSL_MODE', $valid_values);
1336
  $config{'SMTP_SSL_MODE'} = _get_value('SMTP_SSL_MODE', $msg, $defaults->{'SMTP_SSL_MODE'}, $valid_values, $install_log_values);
1337
1338
  $msg = q{
1339
SMTP user name?};
1340
  $config{'SMTP_USER_NAME'} = _get_value('SMTP_USER_NAME', $msg, $defaults->{'SMTP_USER_NAME'}, $valid_values, $install_log_values);
1341
1342
  $msg = q{
1343
SMTP password?};
1344
  $config{'SMTP_PASSWORD'} = _get_value('SMTP_PASSWORD', $msg, $defaults->{'SMTP_PASSWORD'}, $valid_values, $install_log_values);
1345
1346
  $msg = q{
1347
SMTP debug mode?};
1348
  $msg .= _add_valid_values_disp('SMTP_DEBUG', $valid_values);
1349
  $config{'SMTP_DEBUG'} = _get_value('SMTP_DEBUG', $msg, $defaults->{'SMTP_DEBUG'}, $valid_values, $install_log_values);
1350
1351
  $config{'SMTP_DEBUG'} = ( $config{'SMTP_DEBUG'} eq 'yes' ) ? 1 : 0;
1259
1352
1260
  $msg = q(
1353
  $msg = q(
1261
Would you like to run the database-dependent test suite?);
1354
Would you like to run the database-dependent test suite?);
(-)a/etc/koha-conf.xml (-7 / +7 lines)
Lines 261-273 __PAZPAR2_TOGGLE_XML_POST__ Link Here
261
 </koha_xslt_security>
261
 </koha_xslt_security>
262
262
263
 <smtp_server>
263
 <smtp_server>
264
    <host>localhost</host>
264
    <host>__SMTP_HOST__</host>
265
    <port>25</port>
265
    <port>__SMTP_PORT__</port>
266
    <timeout>120</timeout>
266
    <timeout>__SMTP_TIMEOUT__</timeout>
267
    <ssl_mode>disabled</ssl_mode>
267
    <ssl_mode>__SMTP_SSL_MODE__</ssl_mode>
268
    <user_name></user_name>
268
    <user_name>__SMTP_USER_NAME__</user_name>
269
    <password></password>
269
    <password>__SMTP_PASSWORD__</password>
270
    <debug>0</debug>
270
    <debug>__SMTP_DEBUG__</debug>
271
 </smtp_server>
271
 </smtp_server>
272
272
273
</config>
273
</config>
(-)a/rewrite-config.PL (-2 / +8 lines)
Lines 158-164 my %configuration = ( Link Here
158
  "__ELASTICSEARCH_SERVERS__" => "localhost:9200",
158
  "__ELASTICSEARCH_SERVERS__" => "localhost:9200",
159
  "__ELASTICSEARCH_INDEX__" => "koha",
159
  "__ELASTICSEARCH_INDEX__" => "koha",
160
  "__FONT_DIR__" => "/usr/share/fonts/truetype/dejavu",
160
  "__FONT_DIR__" => "/usr/share/fonts/truetype/dejavu",
161
  "__TEMPLATE_CACHE_DIR__" => "/tmp/koha"
161
  "__TEMPLATE_CACHE_DIR__" => "/tmp/koha",
162
  '__SMTP_HOST__'      => 'localhost',
163
  '__SMTP_PORT__'      => '25',
164
  '__SMTP_TIMEOUT__'   => '120',
165
  '__SMTP_SSL_MODE__'  => 'disabled',
166
  '__SMTP_USER_NAME__' => '',
167
  '__SMTP_PASSWORD__'  => '',
168
  '__SMTP_DEBUG__'     => '0',
162
);
169
);
163
170
164
# Override configuration from the environment
171
# Override configuration from the environment
165
- 

Return to bug 26290