X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fportal%2Fdocker%2Finit%2Fmariadb-client%2Fdb_migrate.sh;h=2b90a994c3479162f39ccdb30ecc692f5fa99b07;hb=e4aac7a3c577b7bb9eaae93387d482f952ee4b72;hp=32a634a9e56b3afe4fc08358af9bbb200f47f7b8;hpb=89623667ec00a4710e2c2b9f77a31d369e62f790;p=oom.git diff --git a/kubernetes/portal/docker/init/mariadb-client/db_migrate.sh b/kubernetes/portal/docker/init/mariadb-client/db_migrate.sh index 32a634a9e5..2b90a994c3 100644 --- a/kubernetes/portal/docker/init/mariadb-client/db_migrate.sh +++ b/kubernetes/portal/docker/init/mariadb-client/db_migrate.sh @@ -1,11 +1,26 @@ #!/bin/sh -x + +# Copyright © 2018 Amdocs, Bell Canada, AT&T +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + SQL_DEST_DIR=${SQL_DEST_DIR:-/tmp/sql} DB_PORT=${DB_PORT:-3306} -[[ -z "$SQL_SRC_DIR" ]] && { echo "Error: SQL_SRC_DIR must be provided as an environment variable"; exit 1; } -[[ -z "$DB_USER" ]] && { echo "Error: DB_USER must be provided as an environment variable"; exit 1; } -[[ -z "$DB_PASS" ]] && { echo "Error: DB_PASS must be provided as an environment variable"; exit 1; } -[[ -z "$DB_HOST" ]] && { echo "Error: DB_HOST must be provided as an environment variable"; exit 1; } +[ -z "$SQL_SRC_DIR" ] && { echo "Error: SQL_SRC_DIR must be provided as an environment variable"; exit 1; } +[ -z "$DB_USER" ] && { echo "Error: DB_USER must be provided as an environment variable"; exit 1; } +[ -z "$DB_PASS" ] && { echo "Error: DB_PASS must be provided as an environment variable"; exit 1; } +[ -z "$DB_HOST" ] && { echo "Error: DB_HOST must be provided as an environment variable"; exit 1; } mkdir -p $SQL_DEST_DIR