From 5c82e0c90ce0fedf523b11b0b933f2276edf8f46 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Thu, 27 Aug 2015 19:09:28 -0700 Subject: [PATCH] Move scripts for zaqar to docker_templates Change-Id: I558b4f1d8eceb420a3bf77297bd699f277f840b1 Partially-Implements: blueprint remove-docker-dir --- docker/common/zaqar/config-external.sh | 10 ---------- docker/common/zaqar/start.sh | 21 --------------------- docker_templates/zaqar/config-external.sh | 11 ++++++++++- docker_templates/zaqar/start.sh | 22 +++++++++++++++++++++- 4 files changed, 31 insertions(+), 33 deletions(-) delete mode 100644 docker/common/zaqar/config-external.sh delete mode 100755 docker/common/zaqar/start.sh mode change 120000 => 100644 docker_templates/zaqar/config-external.sh mode change 120000 => 100755 docker_templates/zaqar/start.sh diff --git a/docker/common/zaqar/config-external.sh b/docker/common/zaqar/config-external.sh deleted file mode 100644 index 7ed6da2eb4..0000000000 --- a/docker/common/zaqar/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/zaqar/zaqar.conf" -TARGET="/etc/zaqar/zaqar.conf" -OWNER="zaqar" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker/common/zaqar/start.sh b/docker/common/zaqar/start.sh deleted file mode 100755 index fa10502805..0000000000 --- a/docker/common/zaqar/start.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/zaqar-server" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# 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 - su -s /bin/sh -c "zaqar-manage db_sync" cinder - exit 0 -fi - -exec $CMD $ARGS diff --git a/docker_templates/zaqar/config-external.sh b/docker_templates/zaqar/config-external.sh deleted file mode 120000 index 412266e051..0000000000 --- a/docker_templates/zaqar/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../docker/common/zaqar/config-external.sh \ No newline at end of file diff --git a/docker_templates/zaqar/config-external.sh b/docker_templates/zaqar/config-external.sh new file mode 100644 index 0000000000..7ed6da2eb4 --- /dev/null +++ b/docker_templates/zaqar/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/zaqar/zaqar.conf" +TARGET="/etc/zaqar/zaqar.conf" +OWNER="zaqar" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/zaqar/start.sh b/docker_templates/zaqar/start.sh deleted file mode 120000 index 51966e2712..0000000000 --- a/docker_templates/zaqar/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../docker/common/zaqar/start.sh \ No newline at end of file diff --git a/docker_templates/zaqar/start.sh b/docker_templates/zaqar/start.sh new file mode 100755 index 0000000000..fa10502805 --- /dev/null +++ b/docker_templates/zaqar/start.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/zaqar-server" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# 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 + su -s /bin/sh -c "zaqar-manage db_sync" cinder + exit 0 +fi + +exec $CMD $ARGS