Commit b6c00402 authored by Alex Thomae's avatar Alex Thomae

Removes mandatory DB_NAME

parent 431869b8
Pipeline #73313065 passed with stage
in 1 minute and 32 seconds
......@@ -69,14 +69,6 @@ then
exit 1
fi
if [[ -z "${DB_NAME}" ]]
then
echo "ERROR: Couldn't find the database name." >&2
echo >&2
echo "Please set the DB_NAME environment variable" >&2
exit 1
fi
DB_PORT=${DB_PORT:-3306}
echo "DATABASE SETTINGS"
......@@ -84,7 +76,9 @@ echo "=================="
echo
echo " Host: ${DB_HOST}"
echo " Port: ${DB_PORT}"
echo " Database: ${DB_NAME}"
if [[ -n "${DB_NAME}" ]]; then
echo " Database: ${DB_NAME}"
fi
#
# Change UID / GID of backup user and settings umask.
......@@ -100,11 +94,11 @@ umask ${UMASK}
#
#
CLI_OPTIONS="-v 3 -h ${!DB_ADDR} -P ${!DB_PORT} -u root -p ${!DB_PASS}"
CLI_OPTIONS="-v 3 -h ${DB_ADDR} -P ${DB_PORT} -u root -p ${DB_PASS}"
if [[ -n "${!DB_NAME}" ]]
if [[ -n "${DB_NAME}" ]]
then
CLI_OPTIONS+=" -B ${!DB_NAME}"
CLI_OPTIONS+=" -B ${DB_NAME}"
fi
CLI_OPTIONS+=" ${OPTIONS}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment