Lines 23-28
usage="Usage: $0 [--create-db|--request-db|--populate-db|--use-db] \
Link Here
|
23 |
[--marcflavor marc21|normarc|unimarc] \ |
23 |
[--marcflavor marc21|normarc|unimarc] \ |
24 |
[--zebralang en|es|fr|nb|ru|uk] \ |
24 |
[--zebralang en|es|fr|nb|ru|uk] \ |
25 |
[--auth-idx dom|grs1] [--biblio-idx dom|grs1] \ |
25 |
[--auth-idx dom|grs1] [--biblio-idx dom|grs1] \ |
|
|
26 |
[--use-memcached] \ |
27 |
[--memcached-servers server:port] [--memcached-prefix prefix] \ |
26 |
[--defaultsql /path/to/some.sql] \ |
28 |
[--defaultsql /path/to/some.sql] \ |
27 |
[--configfile /path/to/config] [--passwdfile /path/to/passwd] \ |
29 |
[--configfile /path/to/config] [--passwdfile /path/to/passwd] \ |
28 |
[--database database] [--adminuser n] instancename" |
30 |
[--database database] [--adminuser n] instancename" |
Lines 164-177
set_memcached()
Link Here
|
164 |
if [ "$CLO_MEMCACHED_SERVERS" != "" ]; then |
166 |
if [ "$CLO_MEMCACHED_SERVERS" != "" ]; then |
165 |
MEMCACHED_SERVERS=$CLO_MEMCACHED_SERVERS |
167 |
MEMCACHED_SERVERS=$CLO_MEMCACHED_SERVERS |
166 |
else |
168 |
else |
167 |
MEMCACHED_SERVERS=$DEFAULT_MEMCACHED_SERVERS |
169 |
if [ "$MEMCACHED_SERVERS" = "" ]; then |
|
|
170 |
MEMCACHED_SERVERS=$DEFAULT_MEMCACHED_SERVERS |
171 |
# else: was set by the koha-sites.conf file |
172 |
fi |
168 |
fi |
173 |
fi |
169 |
|
174 |
|
170 |
if [ "$CLO_MEMCACHED_NAMESPACE" != "" ]; then |
175 |
if [ "$CLO_MEMCACHED_PREFIX" != "" ]; then |
171 |
MEMCACHED_NAMESPACE=$CLO_MEMCACHED_NAMESPACE |
176 |
MEMCACHED_NAMESPACE="$CLO_MEMCACHED_PREFIX"_"$instance" |
172 |
else |
177 |
else |
173 |
# default |
178 |
if [ "$MEMCACHED_PREFIX" != "" ]; then |
174 |
MEMCACHED_NAMESPACE="koha_$instance" |
179 |
MEMCACHED_NAMESPACE="$MEMCACHED_PREFIX"_"$instance" |
|
|
180 |
else |
181 |
MEMCACHED_NAMESPACE="$DEFAULT_MEMCACHED_PREFIX"_"$instance" |
182 |
fi |
175 |
fi |
183 |
fi |
176 |
|
184 |
|
177 |
} |
185 |
} |
Lines 189-198
ZEBRA_MARC_FORMAT="marc21"
Link Here
|
189 |
ZEBRA_LANGUAGE="en" |
197 |
ZEBRA_LANGUAGE="en" |
190 |
ADMINUSER="1" |
198 |
ADMINUSER="1" |
191 |
PASSWDFILE="/etc/koha/passwd" |
199 |
PASSWDFILE="/etc/koha/passwd" |
|
|
200 |
|
201 |
# memcached variables |
192 |
USE_MEMCACHED="no" |
202 |
USE_MEMCACHED="no" |
193 |
MEMCACHED_SERVERS="" |
203 |
MEMCACHED_SERVERS="" |
194 |
MEMCACHED_NAMESPACE="" |
204 |
MEMCACHED_PREFIX="" |
|
|
205 |
# hardcoded memcached defaults |
195 |
DEFAULT_MEMCACHED_SERVERS="127.0.0.1:11211" |
206 |
DEFAULT_MEMCACHED_SERVERS="127.0.0.1:11211" |
|
|
207 |
DEFAULT_MEMCACHED_PREFIX="koha_" |
196 |
|
208 |
|
197 |
# Indexing mode variables (default is DOM) |
209 |
# Indexing mode variables (default is DOM) |
198 |
BIBLIOS_INDEXING_MODE="dom" |
210 |
BIBLIOS_INDEXING_MODE="dom" |
Lines 210-216
fi
Link Here
|
210 |
|
222 |
|
211 |
[ $# -ge 2 ] && [ $# -le 16 ] || die $usage |
223 |
[ $# -ge 2 ] && [ $# -le 16 ] || die $usage |
212 |
|
224 |
|
213 |
TEMP=`getopt -o crpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser:,memcached-servers:,memcached-namespace:, \ |
225 |
TEMP=`getopt -o crpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser:,memcached-servers:,memcached-prefix:, \ |
214 |
-n "$0" -- "$@"` |
226 |
-n "$0" -- "$@"` |
215 |
|
227 |
|
216 |
# Note the quotes around `$TEMP': they are essential! |
228 |
# Note the quotes around `$TEMP': they are essential! |
Lines 224-230
CLO_ADMINUSER=""
Link Here
|
224 |
CLO_BIBLIOS_INDEXING_MODE="" |
236 |
CLO_BIBLIOS_INDEXING_MODE="" |
225 |
CLO_AUTHORITIES_INDEXING_MODE="" |
237 |
CLO_AUTHORITIES_INDEXING_MODE="" |
226 |
CLO_MEMCACHED_SERVERS="" |
238 |
CLO_MEMCACHED_SERVERS="" |
227 |
CLO_MEMCACHED_NAMESPACE="" |
239 |
CLO_MEMCACHED_PREFIX="" |
228 |
|
240 |
|
229 |
|
241 |
|
230 |
while true ; do |
242 |
while true ; do |
Lines 239-246
while true ; do
Link Here
|
239 |
--memcached-servers) |
251 |
--memcached-servers) |
240 |
CLO_MEMCACHED_SERVERS="$2" |
252 |
CLO_MEMCACHED_SERVERS="$2" |
241 |
shift 2 ;; |
253 |
shift 2 ;; |
242 |
--memcached-namespace) |
254 |
--memcached-prefix) |
243 |
CLO_MEMCACHED_NAMESPACE="$2" |
255 |
CLO_MEMCACHED_PREFIX="$2" |
244 |
shift 2;; |
256 |
shift 2;; |
245 |
-m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;; |
257 |
-m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;; |
246 |
-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;; |
258 |
-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;; |
247 |
- |
|
|