Skip to content

Commit

Permalink
Sixth
Browse files Browse the repository at this point in the history
  • Loading branch information
namnx228 committed Mar 25, 2021
1 parent 1af248e commit 0b148a6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/runmariadb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ fi

ln -sf /proc/self/fd/1 /var/log/mariadb/mariadb.log

# Restart mysqld when the certificate is updated
if [ "$IRONIC_TLS_SETUP" == "true" ]; then
inotifywait -m -e delete_self "${MARIADB_CERT_FILE}" | while read file event; do
kill $(pgrep mysqld)
done &
fi

if [ ! -d "${DATADIR}/mysql" ]; then
crudini --set "$MARIADB_CONF_FILE" mysqld max_connections 64
crudini --set "$MARIADB_CONF_FILE" mysqld max_heap_table_size 1M
Expand All @@ -44,7 +51,6 @@ DROP DATABASE IF EXISTS test ;
CREATE DATABASE IF NOT EXISTS ironic ;
FLUSH PRIVILEGES ;
EOSQL

# mysqld_safe closes stdout/stderr if no bash options are set ($- == '')
# turn on tracing to prevent this
exec bash -x /usr/bin/mysqld_safe --init-file /tmp/configure-mysql.sql
Expand Down

0 comments on commit 0b148a6

Please sign in to comment.