diff options
Diffstat (limited to 'auth/docker')
-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 |