Make rabbitmq log dir configurable

Change-Id: I020eb6219f89a310451becde41f6f1c7f54baadd
Partial-Bug: #1620374
This commit is contained in:
Paul Bourke 2017-04-05 17:16:58 +01:00
parent 02f136025c
commit 329293b182

View File

@ -1,5 +1,7 @@
#!/bin/bash
: ${RABBITMQ_LOG_DIR:=/var/log/kolla/rabbitmq}
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
@ -16,9 +18,10 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
exit 0
fi
if [[ ! -d "/var/log/kolla/rabbitmq" ]]; then
mkdir -p /var/log/kolla/rabbitmq
if [[ ! -d "${RABBITMQ_LOG_DIR}" ]]; then
mkdir -p ${RABBITMQ_LOG_DIR}
fi
if [[ $(stat -c %a /var/log/kolla/rabbitmq) != "755" ]]; then
chmod 755 /var/log/kolla/rabbitmq
if [[ $(stat -c %a ${RABBITMQ_LOG_DIR}) != "755" ]]; then
chmod 755 ${RABBITMQ_LOG_DIR}
fi