diff --git a/proxy-mysql/alpine/docker-entrypoint.sh b/proxy-mysql/alpine/docker-entrypoint.sh index 96a1faccf..9082bfd81 100755 --- a/proxy-mysql/alpine/docker-entrypoint.sh +++ b/proxy-mysql/alpine/docker-entrypoint.sh @@ -222,11 +222,15 @@ check_db_connect_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } mysql_query() { @@ -235,8 +239,12 @@ mysql_query() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + result=$(mysql --silent --skip-column-names -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" -e "$query" $ssl_opts) + -u ${DB_SERVER_ROOT_USER} -e "$query" $ssl_opts) + + unset MYSQL_PWD echo $result } @@ -283,10 +291,14 @@ create_db_schema_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + zcat /usr/share/doc/zabbix-proxy-mysql/create.sql.gz | mysql --silent --skip-column-names \ -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" $ssl_opts \ + -u ${DB_SERVER_ROOT_USER} $ssl_opts \ ${DB_SERVER_DBNAME} 1>/dev/null + + unset MYSQL_PWD fi } diff --git a/proxy-mysql/centos/docker-entrypoint.sh b/proxy-mysql/centos/docker-entrypoint.sh index de19cec28..202a662ac 100755 --- a/proxy-mysql/centos/docker-entrypoint.sh +++ b/proxy-mysql/centos/docker-entrypoint.sh @@ -181,11 +181,8 @@ db_tls_params() { local result="" if [ -n "${ZBX_DBTLSCONNECT}" ]; then - result="--ssl" - - if [ "${ZBX_DBTLSCONNECT}" != "required" ]; then - result="${result} --ssl-verify-server-cert" - fi + ssl_mode=${ZBX_DBTLSCONNECT//verify_full/verify_identity} + result="--ssl-mode=$ssl_mode" if [ -n "${ZBX_DBTLSCAFILE}" ]; then result="${result} --ssl-ca=${ZBX_DBTLSCAFILE}" @@ -203,7 +200,6 @@ db_tls_params() { echo $result } - check_db_connect_mysql() { echo "********************" echo "* DB_SERVER_HOST: ${DB_SERVER_HOST}" @@ -223,11 +219,15 @@ check_db_connect_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } mysql_query() { @@ -236,8 +236,12 @@ mysql_query() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + result=$(mysql --silent --skip-column-names -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" -e "$query" $ssl_opts) + -u ${DB_SERVER_ROOT_USER} -e "$query" $ssl_opts) + + unset MYSQL_PWD echo $result } @@ -284,10 +288,14 @@ create_db_schema_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + zcat /usr/share/doc/zabbix-proxy-mysql/create.sql.gz | mysql --silent --skip-column-names \ -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" $ssl_opts \ + -u ${DB_SERVER_ROOT_USER} $ssl_opts \ ${DB_SERVER_DBNAME} 1>/dev/null + + unset MYSQL_PWD fi } diff --git a/proxy-mysql/rhel/docker-entrypoint.sh b/proxy-mysql/rhel/docker-entrypoint.sh index 3b8020fb8..202a662ac 100755 --- a/proxy-mysql/rhel/docker-entrypoint.sh +++ b/proxy-mysql/rhel/docker-entrypoint.sh @@ -181,11 +181,8 @@ db_tls_params() { local result="" if [ -n "${ZBX_DBTLSCONNECT}" ]; then - result="--ssl" - - if [ "${ZBX_DBTLSCONNECT}" != "required" ]; then - result="${result} --ssl-verify-server-cert" - fi + ssl_mode=${ZBX_DBTLSCONNECT//verify_full/verify_identity} + result="--ssl-mode=$ssl_mode" if [ -n "${ZBX_DBTLSCAFILE}" ]; then result="${result} --ssl-ca=${ZBX_DBTLSCAFILE}" @@ -203,7 +200,6 @@ db_tls_params() { echo $result } - check_db_connect_mysql() { echo "********************" echo "* DB_SERVER_HOST: ${DB_SERVER_HOST}" diff --git a/proxy-mysql/ubuntu/docker-entrypoint.sh b/proxy-mysql/ubuntu/docker-entrypoint.sh index e0e9e8015..00d0916e9 100755 --- a/proxy-mysql/ubuntu/docker-entrypoint.sh +++ b/proxy-mysql/ubuntu/docker-entrypoint.sh @@ -219,11 +219,15 @@ check_db_connect_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } mysql_query() { @@ -232,8 +236,12 @@ mysql_query() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + result=$(mysql --silent --skip-column-names -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" -e "$query" $ssl_opts) + -u ${DB_SERVER_ROOT_USER} -e "$query" $ssl_opts) + + unset MYSQL_PWD echo $result } @@ -280,10 +288,14 @@ create_db_schema_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + zcat /usr/share/doc/zabbix-proxy-mysql/create.sql.gz | mysql --silent --skip-column-names \ -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" $ssl_opts \ + -u ${DB_SERVER_ROOT_USER} $ssl_opts \ ${DB_SERVER_DBNAME} 1>/dev/null + + unset MYSQL_PWD fi } diff --git a/server-mysql/alpine/docker-entrypoint.sh b/server-mysql/alpine/docker-entrypoint.sh index 45c7b8e09..5d05994b1 100755 --- a/server-mysql/alpine/docker-entrypoint.sh +++ b/server-mysql/alpine/docker-entrypoint.sh @@ -217,11 +217,15 @@ check_db_connect_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } mysql_query() { @@ -230,8 +234,12 @@ mysql_query() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + result=$(mysql --silent --skip-column-names -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" -e "$query" $ssl_opts) + -u ${DB_SERVER_ROOT_USER} -e "$query" $ssl_opts) + + unset MYSQL_PWD echo $result } @@ -278,10 +286,14 @@ create_db_schema_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql --silent --skip-column-names \ -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" $ssl_opts \ + -u ${DB_SERVER_ROOT_USER} $ssl_opts \ ${DB_SERVER_DBNAME} 1>/dev/null + + unset MYSQL_PWD fi } diff --git a/server-mysql/centos/docker-entrypoint.sh b/server-mysql/centos/docker-entrypoint.sh index 45c7b8e09..fc1a18e05 100755 --- a/server-mysql/centos/docker-entrypoint.sh +++ b/server-mysql/centos/docker-entrypoint.sh @@ -176,11 +176,8 @@ db_tls_params() { local result="" if [ -n "${ZBX_DBTLSCONNECT}" ]; then - result="--ssl" - - if [ "${ZBX_DBTLSCONNECT}" != "required" ]; then - result="${result} --ssl-verify-server-cert" - fi + ssl_mode=${ZBX_DBTLSCONNECT//verify_full/verify_identity} + result="--ssl-mode=$ssl_mode" if [ -n "${ZBX_DBTLSCAFILE}" ]; then result="${result} --ssl-ca=${ZBX_DBTLSCAFILE}" @@ -217,11 +214,15 @@ check_db_connect_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } mysql_query() { @@ -230,8 +231,12 @@ mysql_query() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + result=$(mysql --silent --skip-column-names -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" -e "$query" $ssl_opts) + -u ${DB_SERVER_ROOT_USER} -e "$query" $ssl_opts) + + unset MYSQL_PWD echo $result } @@ -278,10 +283,14 @@ create_db_schema_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql --silent --skip-column-names \ -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" $ssl_opts \ + -u ${DB_SERVER_ROOT_USER} $ssl_opts \ ${DB_SERVER_DBNAME} 1>/dev/null + + unset MYSQL_PWD fi } diff --git a/server-mysql/rhel/docker-entrypoint.sh b/server-mysql/rhel/docker-entrypoint.sh index 1ca6fe86b..fc1a18e05 100755 --- a/server-mysql/rhel/docker-entrypoint.sh +++ b/server-mysql/rhel/docker-entrypoint.sh @@ -176,11 +176,8 @@ db_tls_params() { local result="" if [ -n "${ZBX_DBTLSCONNECT}" ]; then - result="--ssl" - - if [ "${ZBX_DBTLSCONNECT}" != "required" ]; then - result="${result} --ssl-verify-server-cert" - fi + ssl_mode=${ZBX_DBTLSCONNECT//verify_full/verify_identity} + result="--ssl-mode=$ssl_mode" if [ -n "${ZBX_DBTLSCAFILE}" ]; then result="${result} --ssl-ca=${ZBX_DBTLSCAFILE}" @@ -287,10 +284,12 @@ create_db_schema_mysql() { ssl_opts="$(db_tls_params)" export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql --silent --skip-column-names \ -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ -u ${DB_SERVER_ROOT_USER} $ssl_opts \ ${DB_SERVER_DBNAME} 1>/dev/null + unset MYSQL_PWD fi } diff --git a/server-mysql/ubuntu/docker-entrypoint.sh b/server-mysql/ubuntu/docker-entrypoint.sh index bbfad1511..fa199fdb1 100755 --- a/server-mysql/ubuntu/docker-entrypoint.sh +++ b/server-mysql/ubuntu/docker-entrypoint.sh @@ -214,11 +214,15 @@ check_db_connect_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } mysql_query() { @@ -227,8 +231,12 @@ mysql_query() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + result=$(mysql --silent --skip-column-names -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" -e "$query" $ssl_opts) + -u ${DB_SERVER_ROOT_USER} -e "$query" $ssl_opts) + + unset MYSQL_PWD echo $result } @@ -275,10 +283,14 @@ create_db_schema_mysql() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql --silent --skip-column-names \ -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} \ - -u ${DB_SERVER_ROOT_USER} --password="${DB_SERVER_ROOT_PASS}" $ssl_opts \ + -u ${DB_SERVER_ROOT_USER} $ssl_opts \ ${DB_SERVER_DBNAME} 1>/dev/null + + unset MYSQL_PWD fi } diff --git a/web-apache-mysql/alpine/docker-entrypoint.sh b/web-apache-mysql/alpine/docker-entrypoint.sh index 50ceeaf0a..dd9a0792c 100755 --- a/web-apache-mysql/alpine/docker-entrypoint.sh +++ b/web-apache-mysql/alpine/docker-entrypoint.sh @@ -195,11 +195,15 @@ check_db_connect() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } prepare_web_server() { diff --git a/web-apache-mysql/centos/docker-entrypoint.sh b/web-apache-mysql/centos/docker-entrypoint.sh index 6ba3a7df3..323cc08ba 100755 --- a/web-apache-mysql/centos/docker-entrypoint.sh +++ b/web-apache-mysql/centos/docker-entrypoint.sh @@ -158,7 +158,7 @@ db_tls_params() { local result="" if [ "${ZBX_DB_ENCRYPTION}" == "true" ]; then - result="--ssl" + result="--ssl-mode=required" if [ -n "${ZBX_DB_CA_FILE}" ]; then result="${result} --ssl-ca=${ZBX_DB_CA_FILE}" @@ -195,11 +195,15 @@ check_db_connect() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } prepare_web_server() { diff --git a/web-apache-mysql/ubuntu/docker-entrypoint.sh b/web-apache-mysql/ubuntu/docker-entrypoint.sh index f40f53f2a..1a2616df9 100755 --- a/web-apache-mysql/ubuntu/docker-entrypoint.sh +++ b/web-apache-mysql/ubuntu/docker-entrypoint.sh @@ -195,11 +195,15 @@ check_db_connect() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } prepare_web_server() { diff --git a/web-nginx-mysql/alpine/docker-entrypoint.sh b/web-nginx-mysql/alpine/docker-entrypoint.sh index 6c1517043..3925f62a9 100755 --- a/web-nginx-mysql/alpine/docker-entrypoint.sh +++ b/web-nginx-mysql/alpine/docker-entrypoint.sh @@ -214,11 +214,15 @@ check_db_connect() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } prepare_web_server() { diff --git a/web-nginx-mysql/centos/docker-entrypoint.sh b/web-nginx-mysql/centos/docker-entrypoint.sh index 3e2bdcf7c..8b92ee362 100755 --- a/web-nginx-mysql/centos/docker-entrypoint.sh +++ b/web-nginx-mysql/centos/docker-entrypoint.sh @@ -176,7 +176,7 @@ db_tls_params() { local result="" if [ "${ZBX_DB_ENCRYPTION}" == "true" ]; then - result="--ssl" + result="--ssl-mode=required" if [ -n "${ZBX_DB_CA_FILE}" ]; then result="${result} --ssl-ca=${ZBX_DB_CA_FILE}" @@ -214,11 +214,15 @@ check_db_connect() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } prepare_web_server() { diff --git a/web-nginx-mysql/rhel/docker-entrypoint.sh b/web-nginx-mysql/rhel/docker-entrypoint.sh index 3c19953c0..8b92ee362 100755 --- a/web-nginx-mysql/rhel/docker-entrypoint.sh +++ b/web-nginx-mysql/rhel/docker-entrypoint.sh @@ -176,7 +176,7 @@ db_tls_params() { local result="" if [ "${ZBX_DB_ENCRYPTION}" == "true" ]; then - result="--ssl" + result="--ssl-mode=required" if [ -n "${ZBX_DB_CA_FILE}" ]; then result="${result} --ssl-ca=${ZBX_DB_CA_FILE}" diff --git a/web-nginx-mysql/ubuntu/docker-entrypoint.sh b/web-nginx-mysql/ubuntu/docker-entrypoint.sh index d4d7579f4..bc1b2bab4 100755 --- a/web-nginx-mysql/ubuntu/docker-entrypoint.sh +++ b/web-nginx-mysql/ubuntu/docker-entrypoint.sh @@ -214,11 +214,15 @@ check_db_connect() { ssl_opts="$(db_tls_params)" + export MYSQL_PWD="${DB_SERVER_ROOT_PASS}" + while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \ - --password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do + --silent --connect_timeout=10 $ssl_opts)" ]; do echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..." sleep $WAIT_TIMEOUT done + + unset MYSQL_PWD } prepare_web_server() {