"/etc/apache2/sites-available/$site.conf"
if [ "$ENABLE_VHOST" = "yes" ]; then
- if ! a2ensite $site > /dev/null 2>&1; then
+ if ! {
+ a2ensite "$site" > /dev/null 2>&1 ||
+ a2ensite "${site}.conf" > /dev/null 2>&1
+ }; then
echo "Warning: problem enabling $site in Apache" >&2
fi
fi
fi
fi
+# Bug 14106 - fix the modulePath of existing koha instances so that it'll
+# continue to work. This will only patch the files if the exact original string
+# that we're fixing them from is there, so we just run it every time. Maybe
+# in many years time we can get rid of this, when no one will be running
+# Koha < 3.20.
+for zfile in $( find /etc/koha/sites -name zebra-authorities-dom.cfg -or -name zebra-biblios-dom.cfg ); do
+ perl -p -i -e 's{^modulePath: /usr/lib/idzebra-2.0/modules$}{modulePath: /usr/lib/idzebra-2.0/modules:/usr/lib/x86_64-linux-gnu/idzebra-2.0/modules:/usr/lib/i386-linux-gnu/idzebra-2.0/modules:/usr/lib/aarch64-linux-gnu/idzebra-2.0/modules:/usr/lib/arm-linux-gnueabi/idzebra-2.0/modules:/usr/lib/arm-linux-gnueabihf/idzebra-2.0/modules:/usr/lib/mips-linux-gnu/idzebra-2.0/modules:/usr/lib/mipsel-linux-gnu/idzebra-2.0/modules:/usr/lib/powerpc-linux-gnu/idzebra-2.0/modules:/usr/lib/powerpc64le-linux-gnu/idzebra-2.0/modules:/usr/lib/s390x-linux-gnu/idzebra-2.0/modules}' $zfile
+done
+
db_stop
+# Bug 18250: Correct startup order of koha-common and memcached
+# Since the init script has been updated, we can force the order in rc.d
+# by disabling and enabling again.
+update-rc.d koha-common disable
+update-rc.d koha-common enable
+
exit 0