From a05704fd1bd8b620c96a13004876e82f73e72af7 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Mon, 17 Sep 2018 13:58:02 -0500 Subject: Auto Auth Data Issue-ID: AAF-420 Change-Id: Ide26f253aaf2a3c3741cb2a0317bc6ea89e357ed Signed-off-by: Instrumental --- auth/docker/drun.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'auth/docker/drun.sh') diff --git a/auth/docker/drun.sh b/auth/docker/drun.sh index 04f5b323..2eb025ea 100644 --- a/auth/docker/drun.sh +++ b/auth/docker/drun.sh @@ -5,8 +5,17 @@ # Only need Cassandra Link Info when initializing the container. if [ ! -e ./cass.props ]; then cp cass.props.init cass.props - echo "Edit appropriate Cassandra Link Info into cass.props" - exit +fi + +CASS_IS_SET="$(grep '' cass.props)" +if [ -n "$CASS_IS_SET" ]; then + CASS_IP="$(docker container inspect aaf_cass | grep \"IPAddress\": -m 1 | cut -d '"' -f 4)" + if [ -n "$CASS_IP" ]; then + sed -i -e "s/\(^.*:\).*/\1$CASS_IP/" cass.props + else + echo "Set CASSASNDRA IP in cass.props" + exit + fi fi . ./cass.props -- cgit 1.2.3-korg