diff options
author | Instrumental <jonathan.gathman@att.com> | 2018-09-17 13:58:02 -0500 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2018-09-17 13:58:06 -0500 |
commit | a05704fd1bd8b620c96a13004876e82f73e72af7 (patch) | |
tree | 60c7ff66e0f32f73fb131ff38bca34686feb3e23 /auth/docker/drun.sh | |
parent | 3f25c89d8fe0ee5e8ef37f64059841eac41e93b8 (diff) |
Auto Auth Data
Issue-ID: AAF-420
Change-Id: Ide26f253aaf2a3c3741cb2a0317bc6ea89e357ed
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/docker/drun.sh')
-rw-r--r-- | auth/docker/drun.sh | 13 |
1 files changed, 11 insertions, 2 deletions
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 IP>' 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 |