Koha/debian/scripts/koha-upgrade-to-3.4
Robin Sheat ae022e9a22 Bug 6651 - fix splitting of names when updating to 3.4
This affects only koha package installations that have multiple
instances running. After this patch, it's worth running the upgrade
again to ensure that everything happened correctly the first time.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-13 10:29:12 +12:00

49 lines
1.4 KiB
Bash
Executable file

#!/bin/sh
#
# koha-upgrade-to-3.4 - performs the necessary changes to upgrade a Koha
# system from 3.2 to 3.4
#
# Copyright 2011 Catalyst IT, Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
TO_UPGRADE=$@
if [ -z "$TO_UPGRADE" ] ;
then
TO_UPGRADE=`koha-list`
fi
if [ -z "$TO_UPGRADE" ] ;
then
echo "No Koha instances were found to upgrade."
exit
fi
cat <<EOH
Koha will be upgraded for the following instances: $TO_UPGRADE
This may take some time to run. Go make a coffee.
EOH
for name in $TO_UPGRADE
do
echo "Upgrading $name..."
sudo -u "$name-koha" -H \
env PERL5LIB=/usr/share/koha/lib \
KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
/usr/share/koha/bin/maintenance/remove_items_from_biblioitems.pl --run
echo "Rebuilding zebra for $name..."
koha-rebuild-zebra --full -v -u $name
done