Lines 19-24
Link Here
|
19 |
|
19 |
|
20 |
set -e |
20 |
set -e |
21 |
|
21 |
|
|
|
22 |
# Read configuration variable file if it is present |
23 |
[ -r /etc/default/koha-common ] && . /etc/default/koha-common |
24 |
|
22 |
# include helper functions |
25 |
# include helper functions |
23 |
if [ -f "/usr/share/koha/bin/koha-functions.sh" ]; then |
26 |
if [ -f "/usr/share/koha/bin/koha-functions.sh" ]; then |
24 |
. "/usr/share/koha/bin/koha-functions.sh" |
27 |
. "/usr/share/koha/bin/koha-functions.sh" |
Lines 49-63
run_rebuild_zebra()
Link Here
|
49 |
{ |
52 |
{ |
50 |
local instancename=$1; shift |
53 |
local instancename=$1; shift |
51 |
|
54 |
|
52 |
# TODO: This comment is here to remind us that we should make |
55 |
if [ "$USE_INDEXER_DAEMON" = "no" ] || |
53 |
# rebuild_zebra.pl return error codes on failure |
56 |
[ "${full_reindex}" = "yes" ] || |
54 |
if sudo -u "$instancename-koha" -H \ |
57 |
[ "${force}" = "yes" ] ; then |
55 |
env PERL5LIB=/usr/share/koha/lib \ |
58 |
|
56 |
KOHA_CONF="/etc/koha/sites/$instancename/koha-conf.xml" \ |
59 |
# TODO: This comment is here to remind us that we should make |
57 |
/usr/share/koha/bin/migration_tools/rebuild_zebra.pl $@ ; then |
60 |
# rebuild_zebra.pl return error codes on failure |
58 |
return 0 |
61 |
if sudo -u "$instancename-koha" -H \ |
59 |
else |
62 |
env PERL5LIB=/usr/share/koha/lib \ |
60 |
return 1 |
63 |
KOHA_CONF="/etc/koha/sites/$instancename/koha-conf.xml" \ |
|
|
64 |
/usr/share/koha/bin/migration_tools/rebuild_zebra.pl $@ ; then |
65 |
return 0 |
66 |
else |
67 |
return 1 |
68 |
fi |
61 |
fi |
69 |
fi |
62 |
} |
70 |
} |
63 |
|
71 |
|
Lines 75-80
Options:
Link Here
|
75 |
--authorities|-a Only run process for authorities. |
83 |
--authorities|-a Only run process for authorities. |
76 |
--biblios|-b Only run process for biblios. |
84 |
--biblios|-b Only run process for biblios. |
77 |
--full|-f Does a reindex of the whole collection. |
85 |
--full|-f Does a reindex of the whole collection. |
|
|
86 |
--force Run incremental indexing even if USE_INDEXER_DAEMON="yes" |
78 |
--quiet|-q Sometimes be a bit quieter for scripts/cronjobs. |
87 |
--quiet|-q Sometimes be a bit quieter for scripts/cronjobs. |
79 |
--verbose|-v Be verbose. |
88 |
--verbose|-v Be verbose. |
80 |
--help|-h Print this help. |
89 |
--help|-h Print this help. |
Lines 93-98
biblios_only="no"
Link Here
|
93 |
authorities_only="no" |
102 |
authorities_only="no" |
94 |
biblios="yes" |
103 |
biblios="yes" |
95 |
authorities="yes" |
104 |
authorities="yes" |
|
|
105 |
force="no" |
106 |
full_reindex="no" |
107 |
|
96 |
# The '-q' option is intended to prevent the cronjob causing this to output |
108 |
# The '-q' option is intended to prevent the cronjob causing this to output |
97 |
# help information if there are no instances defined. |
109 |
# help information if there are no instances defined. |
98 |
quiet="no" |
110 |
quiet="no" |
Lines 113-120
while [ -n "$*" ]; do
Link Here
|
113 |
opt_xml="" |
125 |
opt_xml="" |
114 |
;; |
126 |
;; |
115 |
-f|--full) |
127 |
-f|--full) |
|
|
128 |
full_reindex="yes" |
116 |
opt_idx="-r" |
129 |
opt_idx="-r" |
117 |
;; |
130 |
;; |
|
|
131 |
--force) |
132 |
force="yes" |
133 |
;; |
118 |
-v|--verbose) |
134 |
-v|--verbose) |
119 |
opt_verbose="-v" |
135 |
opt_verbose="-v" |
120 |
;; |
136 |
;; |
121 |
- |
|
|