diff options
author | 2018-03-08 01:55:21 -0500 | |
---|---|---|
committer | 2018-03-08 01:55:21 -0500 | |
commit | ed47d0c5d004b1ce099090100dda6dc1d963782c (patch) | |
tree | c8ed27f9b18206ddd68bd1cdd20d687b965ae8c3 /distribution/cassandra/docker-entrypoint.sh | |
parent | 64cf8e703644f01ef1efde65c86a60ec3e377a5a (diff) |
Docker Updates for CSIT
Udates fro Docker and also a few bug fixes.
Change-Id: I48d8ee81412c7ce664e6b3e33c06e952afad734e
Issue-ID: MUSIC-32, MUSIC-51
Signed-off-by: Thomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com>
Diffstat (limited to 'distribution/cassandra/docker-entrypoint.sh')
-rw-r--r-- | distribution/cassandra/docker-entrypoint.sh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/distribution/cassandra/docker-entrypoint.sh b/distribution/cassandra/docker-entrypoint.sh index e46dea9f..cec4587b 100644 --- a/distribution/cassandra/docker-entrypoint.sh +++ b/distribution/cassandra/docker-entrypoint.sh @@ -60,10 +60,25 @@ if [ "$1" = 'cassandra' ]; then fi done fi + +for f in /docker-entrypoint-initdb.d/*.cql; do + if [ "${CASSUSER}" ]; then + sed -ri 's/CASSUSER/'${CASSUSER}'/' "$f" + fi + if [ "${CASSPASS}" ]; then + sed -ri 's/CASSPASS/'${CASSPASS}'/' "$f" + fi +done + + + + echo "################################ Let run Scripts ##############################" for f in /docker-entrypoint-initdb.d/*; do + case "$f" in - *.cql) echo "$0: running $f" && until cqlsh -u cassandra -p cassandra -f "$f"; do >&2 echo "Cassandra is unavailable - sleeping"; sleep 2; done & ;; + *.cql) + echo "$0: running $f" && until cqlsh -u cassandra -p cassandra -f "$f"; do >&2 echo "Cassandra is unavailable - sleeping"; sleep 2; done & ;; *) echo "$0: ignoring $f" ;; esac echo |