Lines 123-128
getinstancemysqldatabase() {
Link Here
|
123 |
xmlstarlet sel -t -v 'yazgfs/config/database' "/etc/koha/sites/$1/koha-conf.xml" |
123 |
xmlstarlet sel -t -v 'yazgfs/config/database' "/etc/koha/sites/$1/koha-conf.xml" |
124 |
} |
124 |
} |
125 |
|
125 |
|
|
|
126 |
check_apache_config() |
127 |
{ |
128 |
|
129 |
# Check that mpm_itk is installed and enabled |
130 |
if ! /usr/sbin/apachectl -M 2> /dev/null | grep -q 'mpm_itk'; then |
131 |
# Check Apache version |
132 |
APACHE_DISABLE_MPM_MSG="" |
133 |
if /usr/sbin/apache2ctl -v | grep -q "Server version: Apache/2.4"; then |
134 |
# mpm_event or mpm_worker need to be disabled first. mpm_itk depends |
135 |
# on mpm_prefork, which is enabled if needed. See |
136 |
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734865 |
137 |
if /usr/sbin/apachectl -M 2> /dev/null | grep -q 'mpm_event'; then |
138 |
APACHE_DISABLE_MPM_MSG=" sudo a2dismod mpm_event ;" |
139 |
elif /usr/sbin/apachectl -M 2> /dev/null | grep -q 'mpm_worker'; then |
140 |
APACHE_DISABLE_MPM_MSG=" sudo a2dismod mpm_worker ;" |
141 |
# else mpm_prefork: a2enmod mpm_itk works |
142 |
fi |
143 |
# else Apache 2.2: a2enmod mpm_itk works |
144 |
fi |
145 |
|
146 |
cat 1>&2 <<EOM |
147 |
|
148 |
Koha requires mpm_itk to be enabled within Apache in order to run. |
149 |
Typically this can be enabled with: |
150 |
|
151 |
$APACHE_DISABLE_MPM_MSG sudo a2enmod mpm_itk |
152 |
EOM |
153 |
|
154 |
die |
155 |
fi |
156 |
|
157 |
# Check that mod_rewrite is installed and enabled. |
158 |
if ! /usr/sbin/apachectl -M 2> /dev/null | grep -q 'rewrite_module'; then |
159 |
cat 1>&2 <<EOM |
160 |
|
161 |
Koha requires mod_rewrite to be enabled within Apache in order to run. |
162 |
Typically this can be enabled with: |
163 |
|
164 |
sudo a2enmod rewrite |
165 |
EOM |
166 |
die |
167 |
fi |
168 |
} |
169 |
|
126 |
set_biblios_indexing_mode() |
170 |
set_biblios_indexing_mode() |
127 |
{ |
171 |
{ |
128 |
local indexing_mode=$1 |
172 |
local indexing_mode=$1 |
Lines 373-379
elif [ "$CLO_MEMCACHED_SERVERS" != "" ] || \
Link Here
|
373 |
|
417 |
|
374 |
Error: you provided memcached configuration switches but memcached is not enabled. |
418 |
Error: you provided memcached configuration switches but memcached is not enabled. |
375 |
Please set USE_MEMCACHED="yes" on /etc/koha/koha-sites.conf or use the |
419 |
Please set USE_MEMCACHED="yes" on /etc/koha/koha-sites.conf or use the |
376 |
--use-memcached optio switch to enable it. |
420 |
--use-memcached option switch to enable it. |
377 |
|
421 |
|
378 |
EOF` |
422 |
EOF` |
379 |
|
423 |
|
Lines 391-408
then
Link Here
|
391 |
die "This script must be run with root privileges." |
435 |
die "This script must be run with root privileges." |
392 |
fi |
436 |
fi |
393 |
|
437 |
|
394 |
# Check that mod_rewrite is installed so we can bail out if it's not. |
438 |
# Check everything is ok with Apache, die otherwise |
395 |
if ! /usr/sbin/apachectl -M 2> /dev/null | grep -q 'rewrite_module' |
439 |
check_apache_config |
396 |
then |
|
|
397 |
cat 1>&2 <<EOM |
398 |
|
399 |
Koha requires mod_rewrite to be enabled within Apache in order to run. |
400 |
Typically this can be enabled with: |
401 |
|
402 |
sudo a2enmod rewrite |
403 |
EOM |
404 |
die |
405 |
fi |
406 |
|
440 |
|
407 |
opacdomain="$OPACPREFIX$name$OPACSUFFIX$DOMAIN" |
441 |
opacdomain="$OPACPREFIX$name$OPACSUFFIX$DOMAIN" |
408 |
intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN" |
442 |
intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN" |
Lines 493-499
eof
Link Here
|
493 |
|
527 |
|
494 |
# Generate and install Apache site-available file and log dir. |
528 |
# Generate and install Apache site-available file and log dir. |
495 |
generate_config_file apache-site.conf.in \ |
529 |
generate_config_file apache-site.conf.in \ |
496 |
"/etc/apache2/sites-available/$name" |
530 |
"/etc/apache2/sites-available/$name.conf" |
497 |
mkdir "/var/log/koha/$name" |
531 |
mkdir "/var/log/koha/$name" |
498 |
chown "$username:$username" "/var/log/koha/$name" |
532 |
chown "$username:$username" "/var/log/koha/$name" |
499 |
|
533 |
|