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

(-)a/debian/docs/koha-create.xml (+24 lines)
Lines 29-34 Link Here
29
      <arg><option>--zebralang</option> en|es|fr|nb|ru|uk</arg>
29
      <arg><option>--zebralang</option> en|es|fr|nb|ru|uk</arg>
30
      <arg><option>--auth-idx</option> dom|grs1</arg>
30
      <arg><option>--auth-idx</option> dom|grs1</arg>
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>
33
      <arg><option>--memcached-servers</option> server:port</arg>
34
      <arg><option>--memcached-namespace</option> koha_namespace</arg>
32
      <arg><option>--defaultsql</option> /path/to/some.sql</arg>
35
      <arg><option>--defaultsql</option> /path/to/some.sql</arg>
33
      <arg><option>--configfile</option> /path/to/config</arg>
36
      <arg><option>--configfile</option> /path/to/config</arg>
34
      <arg><option>--passwdfile</option> /path/to/passwd</arg>
37
      <arg><option>--passwdfile</option> /path/to/passwd</arg>
Lines 125-130 Link Here
125
      </listitem>
128
      </listitem>
126
    </varlistentry>
129
    </varlistentry>
127
130
131
    <varlistentry>
132
      <term><option>--use-memcached</option></term>
133
      <listitem>
134
        <para>Make the Koha instance use memcached. <option>Disabled by default</option>.</para>
135
      </listitem>
136
    </varlistentry>
137
138
    <varlistentry>
139
      <term><option>--memcached-servers</option></term>
140
      <listitem>
141
        <para>Specify a comma-separated list of host:port memcached servers for using with the created Koha instance. Defaults to <option>127.0.0.1:11211</option>, the needed configuration for a locally installed memcached server.</para>
142
      </listitem>
143
    </varlistentry>
144
145
    <varlistentry>
146
      <term><option>--memcached-namespace</option></term>
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>
149
      </listitem>
150
    </varlistentry>
151
128
  </variablelist>
152
  </variablelist>
129
  </refsect1>
153
  </refsect1>
130
154
(-)a/debian/scripts/koha-create (-2 / +43 lines)
Lines 61-66 generate_config_file() { Link Here
61
        -e "s/__UNIXUSER__/$username/g" \
61
        -e "s/__UNIXUSER__/$username/g" \
62
        -e "s/__UNIXGROUP__/$username/g" \
62
        -e "s/__UNIXGROUP__/$username/g" \
63
        -e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \
63
        -e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \
64
        -e "s/__MEMCACHED_NAMESPACE__/$MEMCACHED_NAMESPACE/g" \
65
        -e "s/__MEMCACHED_SERVERS__/$MEMCACHED_SERVERS/g" \
64
        "/etc/koha/$1" > "$2"
66
        "/etc/koha/$1" > "$2"
65
67
66
}
68
}
Lines 154-159 EOF` Link Here
154
    esac
156
    esac
155
}
157
}
156
158
159
160
set_memcached()
161
{
162
    local instance="$1"
163
164
    if [ "$CLO_MEMCACHED_SERVERS" != "" ]; then
165
        MEMCACHED_SERVERS=$CLO_MEMCACHED_SERVERS
166
    else
167
        MEMCACHED_SERVERS=$DEFAULT_MEMCACHED_SERVERS
168
    fi
169
170
    if [ "$CLO_MEMCACHED_NAMESPACE" != "" ]; then
171
        MEMCACHED_NAMESPACE=$CLO_MEMCACHED_NAMESPACE
172
    else
173
        # default
174
        MEMCACHED_NAMESPACE="koha_$instance"
175
    fi
176
177
}
178
157
# Set defaults and read config file, if it exists.
179
# Set defaults and read config file, if it exists.
158
DOMAIN=""
180
DOMAIN=""
159
OPACPORT="80"
181
OPACPORT="80"
Lines 167-172 ZEBRA_MARC_FORMAT="marc21" Link Here
167
ZEBRA_LANGUAGE="en"
189
ZEBRA_LANGUAGE="en"
168
ADMINUSER="1"
190
ADMINUSER="1"
169
PASSWDFILE="/etc/koha/passwd"
191
PASSWDFILE="/etc/koha/passwd"
192
USE_MEMCACHED="no"
193
MEMCACHED_SERVERS=""
194
MEMCACHED_NAMESPACE=""
195
DEFAULT_MEMCACHED_SERVERS="127.0.0.1:11211"
170
196
171
# Indexing mode variables (default is DOM)
197
# Indexing mode variables (default is DOM)
172
BIBLIOS_INDEXING_MODE="dom"
198
BIBLIOS_INDEXING_MODE="dom"
Lines 184-190 fi Link Here
184
210
185
[ $# -ge 2 ] && [ $# -le 16 ] || die $usage
211
[ $# -ge 2 ] && [ $# -le 16 ] || die $usage
186
212
187
TEMP=`getopt -o crpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser: \
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:, \
188
     -n "$0" -- "$@"`
214
     -n "$0" -- "$@"`
189
215
190
# Note the quotes around `$TEMP': they are essential!
216
# Note the quotes around `$TEMP': they are essential!
Lines 197-202 CLO_DEFAULTSQL="" Link Here
197
CLO_ADMINUSER=""
223
CLO_ADMINUSER=""
198
CLO_BIBLIOS_INDEXING_MODE=""
224
CLO_BIBLIOS_INDEXING_MODE=""
199
CLO_AUTHORITIES_INDEXING_MODE=""
225
CLO_AUTHORITIES_INDEXING_MODE=""
226
CLO_MEMCACHED_SERVERS=""
227
CLO_MEMCACHED_NAMESPACE=""
200
228
201
229
202
while true ; do
230
while true ; do
Lines 204-210 while true ; do Link Here
204
		-c|--create-db) op=create ; shift ;;
232
		-c|--create-db) op=create ; shift ;;
205
		-r|--request-db) op=request ; shift ;;
233
		-r|--request-db) op=request ; shift ;;
206
		-p|--populate-db) op=populate ; shift ;;
234
		-p|--populate-db) op=populate ; shift ;;
207
        -u|--use-db) op=use ; shift ;;
235
            -u|--use-db) op=use ; shift ;;
236
            --use-memcached)
237
                USE_MEMCACHED="yes"
238
                shift ;;
239
            --memcached-servers)
240
                CLO_MEMCACHED_SERVERS="$2"
241
                shift 2 ;;
242
            --memcached-namespace)
243
                CLO_MEMCACHED_NAMESPACE="$2"
244
                shift 2;;
208
		-m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;;
245
		-m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;;
209
		-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;;
246
		-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;;
210
		--auth-idx) CLO_AUTHORITIES_INDEXING_MODE="$2" ; shift 2 ;;
247
		--auth-idx) CLO_AUTHORITIES_INDEXING_MODE="$2" ; shift 2 ;;
Lines 267-272 set_authorities_indexing_mode $AUTHORITIES_INDEXING_MODE $ZEBRA_MARC_FORMAT Link Here
267
304
268
name="$1"
305
name="$1"
269
306
307
if [ "$USE_MEMCACHED" = "yes" ]; then
308
    set_memcached $name
309
fi
310
270
opacdomain="$OPACPREFIX$name$OPACSUFFIX$DOMAIN"
311
opacdomain="$OPACPREFIX$name$OPACSUFFIX$DOMAIN"
271
intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN"
312
intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN"
272
313
(-)a/debian/templates/koha-conf-site.xml.in (-3 / +2 lines)
Lines 276-283 Link Here
276
 <!-- <pazpar2url>http://__PAZPAR2_HOST__:__PAZPAR2_PORT__/search.pz2</pazpar2url> -->
276
 <!-- <pazpar2url>http://__PAZPAR2_HOST__:__PAZPAR2_PORT__/search.pz2</pazpar2url> -->
277
 <install_log>/usr/share/koha/misc/koha-install-log</install_log>
277
 <install_log>/usr/share/koha/misc/koha-install-log</install_log>
278
 <useldapserver>0</useldapserver><!-- see C4::Auth_with_ldap for extra configs you must add if you want to turn this on -->
278
 <useldapserver>0</useldapserver><!-- see C4::Auth_with_ldap for extra configs you must add if you want to turn this on -->
279
 <memcached_servers></memcached_servers>
279
 <memcached_servers>__MEMCACHED_SERVERS__</memcached_servers>
280
 <memcached_namespace></memcached_namespace>
280
 <memcached_namespace>__MEMCACHED_NAMESPACE__</memcached_namespace>
281
 <zebra_bib_index_mode>__BIBLIOS_INDEXING_MODE__</zebra_bib_index_mode>
281
 <zebra_bib_index_mode>__BIBLIOS_INDEXING_MODE__</zebra_bib_index_mode>
282
 <zebra_auth_index_mode>__AUTHORITIES_INDEXING_MODE__</zebra_auth_index_mode>
282
 <zebra_auth_index_mode>__AUTHORITIES_INDEXING_MODE__</zebra_auth_index_mode>
283
 <queryparser_config>/etc/koha/searchengine/queryparser.yaml</queryparser_config>
283
 <queryparser_config>/etc/koha/searchengine/queryparser.yaml</queryparser_config>
284
- 

Return to bug 10733