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

(-)a/debian/docs/koha-create.xml (-3 / +25 lines)
Lines 31-37 Link Here
31
      <arg><option>--biblio-idx</option> dom|grs1</arg>
31
      <arg><option>--biblio-idx</option> dom|grs1</arg>
32
      <arg><option>--use-memcached</option></arg>
32
      <arg><option>--use-memcached</option></arg>
33
      <arg><option>--memcached-servers</option> server:port</arg>
33
      <arg><option>--memcached-servers</option> server:port</arg>
34
      <arg><option>--memcached-namespace</option> koha_namespace</arg>
34
      <arg><option>--memcached-prefix</option> namespace_prefix</arg>
35
      <arg><option>--defaultsql</option> /path/to/some.sql</arg>
35
      <arg><option>--defaultsql</option> /path/to/some.sql</arg>
36
      <arg><option>--configfile</option> /path/to/config</arg>
36
      <arg><option>--configfile</option> /path/to/config</arg>
37
      <arg><option>--passwdfile</option> /path/to/passwd</arg>
37
      <arg><option>--passwdfile</option> /path/to/passwd</arg>
Lines 143-151 Link Here
143
    </varlistentry>
143
    </varlistentry>
144
144
145
    <varlistentry>
145
    <varlistentry>
146
      <term><option>--memcached-namespace</option></term>
146
      <term><option>--memcached-prefix</option></term>
147
      <listitem>
147
      <listitem>
148
        <para>Specifiy a memcached <option>namespace</option> for the created Koha instance. You usually leave this option alone to avoid namespace collisions. It defaults to <option>koha_instance</option>.</para>
148
        <para>Specifiy a <option>namespace prefix</option> for memcached. You usually leave this option alone to avoid namespace collisions. It defaults to <option>koha_</option>.</para>
149
      </listitem>
149
      </listitem>
150
    </varlistentry>
150
    </varlistentry>
151
151
Lines 219-224 Link Here
219
      </varlistentry>
219
      </varlistentry>
220
220
221
      <varlistentry>
221
      <varlistentry>
222
        <term><option>USE_MEMCACHED</option></term>
223
        <listitem>
224
          <para>Valid values are <option>yes</option> and <option>no</option>. If not present koha-create will default to <option>no</option>. Also, this will be overriden by the <option>--use-memcached</option> switch.</para>
225
        </listitem>
226
      </varlistentry>
227
228
      <varlistentry>
229
        <term><option>MEMCACHED_SERVERS</option></term>
230
        <listitem>
231
          <para>A comma-separated list of valid memcached servers. Usually in the form of <option>host:port</option>. If not present koha-create will default to <option>127.0.0.1:11211</option>. Also, this will be overriden by the arguments of the <option>--memcached-servers</option> switch.</para>
232
        </listitem>
233
      </varlistentry>
234
235
      <varlistentry>
236
        <term><option>MEMCACHED_PREFIX</option></term>
237
        <listitem>
238
          <para>A prefix for all new Koha instances to use in memcached. If not present koha-create will default to <option>koha_</option>. Also, this will be overriden by the arguments of the <option>--memcached-prefix</option> switch.</para>
239
        </listitem>
240
      </varlistentry>
241
242
243
      <varlistentry>
222
        <term><option>ZEBRA_MARC_FORMAT</option></term>
244
        <term><option>ZEBRA_MARC_FORMAT</option></term>
223
        <listitem>
245
        <listitem>
224
          <para>Specifies format of MARC records to be indexed by Zebra.  Possible values are 'marc21', 'normarc' and 'unimarc'.</para>
246
          <para>Specifies format of MARC records to be indexed by Zebra.  Possible values are 'marc21', 'normarc' and 'unimarc'.</para>
(-)a/debian/scripts/koha-create (-11 / +22 lines)
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
- 

Return to bug 10733