d79c07effb
Fix existing spell checking Change-Id: Ief7b8f2d427b2557c84fda9b3774ed85ceb105f4
35 lines
944 B
Bash
35 lines
944 B
Bash
#!/bin/bash
|
|
|
|
PROXYSQL_LIB_DIR="/var/lib/proxysql"
|
|
PROXYSQL_LOG_DIR="/var/log/kolla/proxysql"
|
|
|
|
if [[ ! -d "${PROXYSQL_LOG_DIR}" ]]; then
|
|
mkdir -p "${PROXYSQL_LOG_DIR}"
|
|
fi
|
|
chown -R proxysql:kolla "${PROXYSQL_LOG_DIR}"
|
|
|
|
# Proxysql has configuration stored in
|
|
# its own internal DB and config file
|
|
# is used only for bootstrap DB by default.
|
|
# Once DB is bootstrapped, config
|
|
# file is ignored.
|
|
#
|
|
# This behaviour is not what we want
|
|
# while configuring via kolla-ansible.
|
|
# Therefore let's remove internal DB
|
|
# and bootstrap it every time as config
|
|
# file is generated on kolla-ansible side.
|
|
rm -f ${PROXYSQL_LIB_DIR}/proxysql.db
|
|
|
|
# Remove old pid
|
|
rm -f ${PROXYSQL_LIB_DIR}/proxysql.pid
|
|
|
|
# As proxysql supports only one
|
|
# configuration file, there is a
|
|
# script which reads global and services
|
|
# configs (similar to haproxy) and
|
|
# generate single configuration file
|
|
# from which is internal DB created
|
|
# every time.
|
|
kolla_proxysql_config_sync
|