kolla/docker/mariadb/mariadb-clustercheck/extend_start.sh
Mark Goddard 9035251443 mariadb-clustercheck: ensure /var/log/kolla/mariadb exists
If mariadb-clustercheck starts before mariadb, the directory may not
exist, and the command fails.

This is necessary for the refactored MariaDB restart in
I5a12670d07077d24047aaff57ce8d33ccf7156ff.

Change-Id: Ie1b36eb9a403611c2f86aa4c1d500d324e5291f3
2023-05-30 15:50:01 +00:00

12 lines
281 B
Bash

#!/bin/bash
: ${MARIADB_LOG_DIR:=/var/log/kolla/mariadb}
# Create log directory, with appropriate permissions
if [[ ! -d "${MARIADB_LOG_DIR}" ]]; then
mkdir -p ${MARIADB_LOG_DIR}
fi
if [[ $(stat -c %a ${MARIADB_LOG_DIR}) != "755" ]]; then
chmod 755 ${MARIADB_LOG_DIR}
fi