File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
entrypoint_scripts/common Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -247,14 +247,18 @@ function ensure_mysql_application_db() {
247247 if mysql -fs --protocol=TCP -h " $SQLHOST " -P " $SQLPORT " -u" $SQLUSER " -p" $SQLPWD " " $DBNAME " > /dev/null 2>&1 < /dev/null; then
248248 echo " Database $DBNAME already exists!"
249249 echo
250- read -p " Drop database $DBNAME ? [Y/n] " DELETE
250+ if [ " $AUTO_DOCKER " == " yes" ]; then
251+ if [ -z " $FLUSHDB " ]; then
252+ DELETE=" yes"
253+ else
254+ DELETE=" $FLUSHDB "
255+ fi
256+ else
257+ read -p " Drop database $DBNAME ? [Y/n] " DELETE
258+ fi
251259 if [[ ! $DELETE =~ ^[nN]$ ]]; then
252260 mysqladmin -f --protocol=TCP --host=" $SQLHOST " --port=" $SQLPORT " --user=" $SQLUSER " --password=" $SQLPWD " drop " $DBNAME "
253261 mysqladmin --protocol=TCP --host=" $SQLHOST " --port=" $SQLPORT " --user=" $SQLUSER " --password=" $SQLPWD " create " $DBNAME "
254- else
255- echo " Error! Must supply an empty database to proceed."
256- echo
257- ensure_mysql_application_db
258262 fi
259263 else
260264 # Set the root password for mysql - install has it blank
You can’t perform that action at this time.
0 commit comments