summaryrefslogtreecommitdiffstats
path: root/auth/auth-service/src/main/resources/docker-compose/startupaaf.sh
blob: b45bba5ef454fd952bcbc2aa4eb29544b75eee66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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/lib

ETC=/opt/app/aaf/authz-service/etc
DME2REG=/opt/dme2reg

echo "this is LIB" $LIB
echo "this is ETC" $ETC
echo "this is DME2REG" $DME2REG

CLASSPATH=$ETC
for FILE in `find $LIB -name *.jar`; do
  CLASSPATH=$CLASSPATH:$FILE
done

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