Bug 16749: Add is_instance check to koha-upgrade-schema

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2017-02-16 14:07:05 +00:00 committed by Kyle M Hall
parent 70e709393d
commit c5901cad45
1 changed files with 8 additions and 4 deletions

View File

@ -39,8 +39,12 @@ fi
for name in "$@"
do
echo "Upgrading database schema for $name"
KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
PERL5LIB=$PERL5LIB \
"$CGI_PATH/installer/data/mysql/updatedatabase.pl"
if is_instance $name; then
echo "Upgrading database schema for $name"
KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
PERL5LIB=$PERL5LIB \
"$CGI_PATH/installer/data/mysql/updatedatabase.pl"
else
die "Error: Invalid instance name $name"
fi
done