|
Lines 13-19
use C4::Items;
Link Here
|
| 13 |
use Koha::RecordProcessor; |
13 |
use Koha::RecordProcessor; |
| 14 |
use XML::LibXML; |
14 |
use XML::LibXML; |
| 15 |
|
15 |
|
| 16 |
# |
|
|
| 17 |
# script that checks zebradir structure & create directories & mandatory files if needed |
16 |
# script that checks zebradir structure & create directories & mandatory files if needed |
| 18 |
# |
17 |
# |
| 19 |
# |
18 |
# |
|
Lines 40-45
my $do_not_clear_zebraqueue;
Link Here
|
| 40 |
my $length; |
39 |
my $length; |
| 41 |
my $where; |
40 |
my $where; |
| 42 |
my $offset; |
41 |
my $offset; |
|
|
42 |
my $run_as_root; |
| 43 |
my $run_user = (getpwuid($<))[0]; |
| 44 |
|
| 43 |
my $verbose_logging = 0; |
45 |
my $verbose_logging = 0; |
| 44 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
46 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
| 45 |
my $result = GetOptions( |
47 |
my $result = GetOptions( |
|
Lines 47-53
my $result = GetOptions(
Link Here
|
| 47 |
'r|reset' => \$reset, |
49 |
'r|reset' => \$reset, |
| 48 |
's' => \$skip_export, |
50 |
's' => \$skip_export, |
| 49 |
'k' => \$keep_export, |
51 |
'k' => \$keep_export, |
| 50 |
'I|skip-index' => \$skip_index, |
52 |
'I|skip-index' => \$skip_index, |
| 51 |
'nosanitize' => \$nosanitize, |
53 |
'nosanitize' => \$nosanitize, |
| 52 |
'b' => \$biblios, |
54 |
'b' => \$biblios, |
| 53 |
'noxml' => \$noxml, |
55 |
'noxml' => \$noxml, |
|
Lines 62-75
my $result = GetOptions(
Link Here
|
| 62 |
'length:i' => \$length, |
64 |
'length:i' => \$length, |
| 63 |
'offset:i' => \$offset, |
65 |
'offset:i' => \$offset, |
| 64 |
'v+' => \$verbose_logging, |
66 |
'v+' => \$verbose_logging, |
|
|
67 |
'run-as-root' => \$run_as_root, |
| 65 |
); |
68 |
); |
| 66 |
|
69 |
|
| 67 |
|
|
|
| 68 |
if (not $result or $want_help) { |
70 |
if (not $result or $want_help) { |
| 69 |
print_usage(); |
71 |
print_usage(); |
| 70 |
exit 0; |
72 |
exit 0; |
| 71 |
} |
73 |
} |
| 72 |
|
74 |
|
|
|
75 |
if( not defined $run_as_root and $run_user eq 'root') { |
| 76 |
my $msg = "Warning: You are running this script as the user 'root'.\n"; |
| 77 |
$msg .= "If this is intentional you must explicitly specify this using the -run-as-root switch\n"; |
| 78 |
$msg .= "Please do '$0 --help' to see usage.\n"; |
| 79 |
die $msg; |
| 80 |
} |
| 81 |
|
| 73 |
if (not $biblios and not $authorities) { |
82 |
if (not $biblios and not $authorities) { |
| 74 |
my $msg = "Must specify -b or -a to reindex bibs or authorities\n"; |
83 |
my $msg = "Must specify -b or -a to reindex bibs or authorities\n"; |
| 75 |
$msg .= "Please do '$0 --help' to see usage.\n"; |
84 |
$msg .= "Please do '$0 --help' to see usage.\n"; |
|
Lines 679-684
Use this batch job to reindex all biblio or authority
Link Here
|
| 679 |
records in your Koha database. |
688 |
records in your Koha database. |
| 680 |
|
689 |
|
| 681 |
Parameters: |
690 |
Parameters: |
|
|
691 |
|
| 682 |
-b index bibliographic records |
692 |
-b index bibliographic records |
| 683 |
|
693 |
|
| 684 |
-a index authority records |
694 |
-a index authority records |
|
Lines 738-743
Parameters:
Link Here
|
| 738 |
|
748 |
|
| 739 |
--munge-config Deprecated option to try |
749 |
--munge-config Deprecated option to try |
| 740 |
to fix Zebra config files. |
750 |
to fix Zebra config files. |
|
|
751 |
|
| 752 |
--run-as-root explicitily allow script to run as 'root' user |
| 753 |
|
| 741 |
--help or -h show this message. |
754 |
--help or -h show this message. |
| 742 |
_USAGE_ |
755 |
_USAGE_ |
| 743 |
} |
756 |
} |
| 744 |
- |
|
|