X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fdocker%2Faaf.sh;h=6ba8631db641c7d1c99cfe48166e464985c41838;hb=ca788dc542830b054f0a46df2dfd774fc318872c;hp=5757051fc4881004600f009f92b0051b470aa38d;hpb=196000bb838818d9e3cc3d5c08614c1898388135;p=aaf%2Fauthz.git diff --git a/auth/docker/aaf.sh b/auth/docker/aaf.sh index 5757051f..6ba8631d 100644 --- a/auth/docker/aaf.sh +++ b/auth/docker/aaf.sh @@ -1,17 +1,17 @@ #!/bin/bash . ./d.props -if [ -e ./cass.props ]; then - . ./cass.props -fi +DOCKER=${DOCKER:=docker} function run_it() { - docker run $@ \ - --mount 'type=volume,src=aaf_config,dst='$CONF_ROOT_DIR',volume-driver=local' \ + $DOCKER run $@ \ + -v "aaf_config:$CONF_ROOT_DIR" \ + -v "aaf_status:/opt/app/aaf/status" \ --add-host="$HOSTNAME:$HOST_IP" \ --add-host="aaf.osaaf.org:$HOST_IP" \ --env HOSTNAME=${HOSTNAME} \ --env AAF_ENV=${AAF_ENV} \ --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \ + --env AAF_LOCATOR_AS=${AAF_LOCATOR_AS} \ --env LATITUDE=${LATITUDE} \ --env LONGITUDE=${LONGITUDE} \ --env CASS_HOST=${CASS_HOST} \ @@ -24,20 +24,18 @@ function run_it() { /bin/bash $PARAMS } -function set_prop() { -docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2" "$3" -} - -function encrypt_it() { - docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP encrypt "$1" "$2" -} - -function set_it() { - docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2" -} - PARAMS="$@" -if [ "$PARAMS" != "" ]; then - run_it -it --rm -fi +case "$1" in + bash) + run_it -it --rm + ;; + -it) + shift + PARAMS="$@" + run_it -it --rm + ;; + *) + run_it --rm + ;; +esac