From b11321cedcfca8c394eefffae9589eba9b470fa2 Mon Sep 17 00:00:00 2001 From: "xiabing.yao" Date: Thu, 6 Aug 2015 17:32:56 +0800 Subject: 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 --- .../swift/swift-container-server/config-external.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'docker/common/swift/swift-container-server') diff --git a/docker/common/swift/swift-container-server/config-external.sh b/docker/common/swift/swift-container-server/config-external.sh index 6f4186e0f..93f696349 100644 --- a/docker/common/swift/swift-container-server/config-external.sh +++ b/docker/common/swift/swift-container-server/config-external.sh @@ -1,13 +1,18 @@ #!/bin/bash +SOURCE="/opt/kolla/swift/swift.conf" +TARGET="/etc/swift/swift.conf" +SOURCE_CONTAINER_SERVER="/opt/kolla/swift/container-server.conf" +TARGET_CONTAINER_SERVER="/etc/swift/container-server.conf" +OWNER="swift" -if [[ -f /opt/kolla/swift/swift.conf ]]; then - cp /opt/kolla/swift/swift.conf /etc/swift/ - chown swift: /etc/swift/swift.conf - chmod 0640 /etc/swift/swift.conf +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0640 $TARGET fi -if [[ -f /opt/kolla/swift/container-server.conf ]]; then - cp /opt/kolla/swift/container-server.conf /etc/swift/ - chown swift: /etc/swift/container-server.conf - chmod 0640 /etc/swift/container-server.conf +if [[ -f "$SOURCE_CONTAINER_SERVER" ]]; then + cp $SOURCE_CONTAINER_SERVER $TARGET_CONTAINER_SERVER + chown ${OWNER}: $TARGET_CONTAINER_SERVER + chmod 0640 $TARGET_CONTAINER_SERVER fi -- cgit v1.2.3