Move scripts for zaqar to docker_templates

Change-Id: I558b4f1d8eceb420a3bf77297bd699f277f840b1
Partially-Implements: blueprint remove-docker-dir
This commit is contained in:
Steven Dake 2015-08-27 19:09:28 -07:00
parent 26d0d8d2fb
commit 5c82e0c90c
4 changed files with 31 additions and 33 deletions

View File

@ -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

View File

@ -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

View File

@ -1 +0,0 @@
../../docker/common/zaqar/config-external.sh

View File

@ -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

View File

@ -1 +0,0 @@
../../docker/common/zaqar/start.sh

21
docker_templates/zaqar/start.sh Executable file
View File

@ -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