Lines 12-18
use C4::AuthoritiesMarc;
Link Here
|
12 |
use C4::Items; |
12 |
use C4::Items; |
13 |
use Koha::RecordProcessor; |
13 |
use Koha::RecordProcessor; |
14 |
|
14 |
|
15 |
# |
|
|
16 |
# script that checks zebradir structure & create directories & mandatory files if needed |
15 |
# script that checks zebradir structure & create directories & mandatory files if needed |
17 |
# |
16 |
# |
18 |
# |
17 |
# |
Lines 39-44
my $do_not_clear_zebraqueue;
Link Here
|
39 |
my $length; |
38 |
my $length; |
40 |
my $where; |
39 |
my $where; |
41 |
my $offset; |
40 |
my $offset; |
|
|
41 |
my $run_as_root; |
42 |
my $run_user = (getpwuid($<))[0]; |
43 |
### $run_user |
44 |
### $run_as_root |
45 |
|
46 |
|
42 |
my $verbose_logging = 0; |
47 |
my $verbose_logging = 0; |
43 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
48 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
44 |
my $result = GetOptions( |
49 |
my $result = GetOptions( |
Lines 46-52
my $result = GetOptions(
Link Here
|
46 |
'r|reset' => \$reset, |
51 |
'r|reset' => \$reset, |
47 |
's' => \$skip_export, |
52 |
's' => \$skip_export, |
48 |
'k' => \$keep_export, |
53 |
'k' => \$keep_export, |
49 |
'I|skip-index' => \$skip_index, |
54 |
'I|skip-index' => \$skip_index, |
50 |
'nosanitize' => \$nosanitize, |
55 |
'nosanitize' => \$nosanitize, |
51 |
'b' => \$biblios, |
56 |
'b' => \$biblios, |
52 |
'noxml' => \$noxml, |
57 |
'noxml' => \$noxml, |
Lines 61-73
my $result = GetOptions(
Link Here
|
61 |
'length:i' => \$length, |
66 |
'length:i' => \$length, |
62 |
'offset:i' => \$offset, |
67 |
'offset:i' => \$offset, |
63 |
'v+' => \$verbose_logging, |
68 |
'v+' => \$verbose_logging, |
|
|
69 |
'run-as-root' => \$run_as_root, |
64 |
); |
70 |
); |
65 |
|
71 |
|
66 |
|
|
|
67 |
if (not $result or $want_help) { |
72 |
if (not $result or $want_help) { |
68 |
print_usage(); |
73 |
print_usage(); |
69 |
exit 0; |
74 |
exit 0; |
70 |
} |
75 |
} |
|
|
76 |
### $run_user |
77 |
### $run_as_root |
78 |
|
79 |
|
80 |
if( undef $run_as_root and $run_user eq 'root') { |
81 |
my $msg = "Warning: You are running this script as the user 'root'.\n"; |
82 |
$msg .= "If this is intentional you must explicitly specify this using the -run-as-root switch\n"; |
83 |
$msg .= "Please do '$0 --help' to see usage.\n"; |
84 |
die $msg; |
85 |
} |
71 |
|
86 |
|
72 |
if (not $biblios and not $authorities) { |
87 |
if (not $biblios and not $authorities) { |
73 |
my $msg = "Must specify -b or -a to reindex bibs or authorities\n"; |
88 |
my $msg = "Must specify -b or -a to reindex bibs or authorities\n"; |
Lines 657-662
only if you are using Zebra; if you are using the 'NoZebra'
Link Here
|
657 |
mode, this job should not be used. |
672 |
mode, this job should not be used. |
658 |
|
673 |
|
659 |
Parameters: |
674 |
Parameters: |
|
|
675 |
|
660 |
-b index bibliographic records |
676 |
-b index bibliographic records |
661 |
|
677 |
|
662 |
-a index authority records |
678 |
-a index authority records |
Lines 716-721
Parameters:
Link Here
|
716 |
|
732 |
|
717 |
--munge-config Deprecated option to try |
733 |
--munge-config Deprecated option to try |
718 |
to fix Zebra config files. |
734 |
to fix Zebra config files. |
|
|
735 |
|
736 |
--run-as-root explicitily allow script to run as 'root' user |
737 |
|
719 |
--help or -h show this message. |
738 |
--help or -h show this message. |
720 |
_USAGE_ |
739 |
_USAGE_ |
721 |
} |
740 |
} |
722 |
- |
|
|