diff options
Diffstat (limited to 'authz-service/src/main/resources/docker/startup.sh')
-rw-r--r-- | authz-service/src/main/resources/docker/startup.sh | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/authz-service/src/main/resources/docker/startup.sh b/authz-service/src/main/resources/docker/startup.sh index 7b18f9dc..b45bba5e 100644 --- a/authz-service/src/main/resources/docker/startup.sh +++ b/authz-service/src/main/resources/docker/startup.sh @@ -1,7 +1,9 @@ +# lji: this startup file shadows the existing extry point startup.sh file of the container +# because we need to pass in the cassandra cluster location -LIB=/opt/app/aaf/authz-service/1.0.0-SNAPSHOT/lib +LIB=/opt/app/aaf/authz-service/lib -ETC=/opt/app/aaf/authz-service/1.0.0-SNAPSHOT/etc +ETC=/opt/app/aaf/authz-service/etc DME2REG=/opt/dme2reg echo "this is LIB" $LIB @@ -12,10 +14,21 @@ CLASSPATH=$ETC for FILE in `find $LIB -name *.jar`; do CLASSPATH=$CLASSPATH:$FILE done -java -classpath $CLASSPATH -DDME2_EP_REGISTRY_CLASS=DME2FS -DAFT_DME2_EP_REGISTRY_FS_DIR=$DME2REG org.onap.aaf.authz.service.AuthAPI +FILEPATHS="/opt/app/aaf/authz-service/etc/com.osaaf.common.props /opt/app/aaf/authz-service/etc/com.osaaf.common.props" +for FILEPATH in $FILEPATHS: +do + if [ -e ${FILEPATH} ]; then + if [ -z `grep "cassandra.clusters=$CASSANDRA_CLUSTER" $FILEPATH` ]; then + echo "cassandra.clusters=$CASSANDRA_CLUSTER" >> $FILEPATH; + fi + fi +done +java -classpath $CLASSPATH -DDME2_EP_REGISTRY_CLASS=DME2FS -DAFT_DME2_EP_REGISTRY_FS_DIR=$DME2REG org.onap.aaf.authz.service.AuthAPI +# keet it running so we can check fs +while sleep 2; do echo thinking; done |