kolla-ansible/docker/common/rabbitmq/config-external.sh
xiabing.yao b11321cedc update config-external.sh in galera,keystone,rabbitmq,swift
Use variables like SOURCE,TARGET in config-external.sh, so
it will easy to modify in future.

Closes-Bug: #1485710

Change-Id: I3880a2cbca8a80d36e84a797fcfb943e43b88bd5
2015-08-06 22:27:28 +08:00

20 lines
522 B
Bash

#!/bin/bash
SOURCE_CONFIG="/opt/kolla/rabbitmq/rabbitmq.config"
TARGET_CONFIG="/etc/rabbitmq/rabbitmq.config"
SOURCE_ENV="/opt/kolla/rabbitmq/rabbitmq-env.conf"
TARGET_ENV="/etc/rabbitmq/rabbitmq-env.conf"
OWNER="rabbitmq"
# Cluster configuration
if [[ -f "$SOURCE_CONFIG" ]]; then
cp -af $SOURCE_CONFIG $TARGET_CONFIG
chown ${OWNER}: $TARGET_CONFIG
chmod 0600 $TARGET_CONFIG
fi
if [[ -f "$SOURCE_ENV" ]]; then
cp -af $SOURCE_ENV $TARGET_ENV
chown ${OWNER}: $TARGET_ENV
chmod 0600 $TARGET_ENV
fi