From c5901cad450e8a869e7b53347cc6dbf4604f7a90 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 16 Feb 2017 14:07:05 +0000 Subject: [PATCH] Bug 16749: Add is_instance check to koha-upgrade-schema Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- debian/scripts/koha-upgrade-schema | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/debian/scripts/koha-upgrade-schema b/debian/scripts/koha-upgrade-schema index c1cc6cb989..da50d41f10 100755 --- a/debian/scripts/koha-upgrade-schema +++ b/debian/scripts/koha-upgrade-schema @@ -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 -- 2.39.5