Missing Licenses
[aaf/authz.git] / auth / docker / agent.sh
index 38b1070..820b1fa 100644 (file)
@@ -1,6 +1,24 @@
 #!/bin/bash
+#########
+#  ============LICENSE_START====================================================
+#  org.onap.aaf
+#  ===========================================================================
+#  Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+#  ===========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END====================================================
+#
 
-CADI_VERSION=2.1.2-SNAPSHOT
 
 # Fill out "aaf.props" if not filled out already
 if [ ! -e aaf.props ]; then
@@ -9,6 +27,8 @@ fi
  
 . ./aaf.props
 
+DOCKER=${DOCKER:=docker}
+CADI_VERSION=${CADI_VERSION:=2.1.7-SNAPSHOT}
 
 for V in VERSION DOCKER_REPOSITORY AAF_FQDN AAF_FQDN_IP DEPLOY_FQI APP_FQDN APP_FQI VOLUME DRIVER LATITUDE LONGITUDE; do
    if [ "$(grep $V ./aaf.props)" = "" ]; then
@@ -53,9 +73,9 @@ done
 . ./aaf.props
 
 # Make sure Container Volume exists
-if [ "$(docker volume ls | grep ${VOLUME})" = "" ]; then
+if [ "$($DOCKER volume ls | grep ${VOLUME})" = "" ]; then
   echo -n "Creating Volume: " 
-  docker volume create -d ${DRIVER} ${VOLUME}
+  $DOCKER volume create -d ${DRIVER} ${VOLUME}
 fi
 
 if [ -n "$DOCKER_REPOSITORY" ]; then
@@ -64,10 +84,10 @@ else
   PREFIX=""
 fi 
 
-docker run \
+$DOCKER run \
     -it \
     --rm \
-    --mount 'type=volume,src='${VOLUME}',dst=/opt/app/osaaf,volume-driver='${DRIVER} \
+    -v "${VOLUME}:/opt/app/osaaf" \
     --add-host="$AAF_FQDN:$AAF_FQDN_IP" \
     --env AAF_FQDN=${AAF_FQDN} \
     --env DEPLOY_FQI=${DEPLOY_FQI} \