sg481n | a2ac678 | 2017-09-18 16:35:50 -0400 | [diff] [blame] | 1 | # lji: this startup file shadows the existing extry point startup.sh file of the container |
| 2 | # because we need to pass in the cassandra cluster location |
sg481n | dc5fcf1 | 2017-09-15 13:06:30 -0400 | [diff] [blame] | 3 | |
sg481n | a2ac678 | 2017-09-18 16:35:50 -0400 | [diff] [blame] | 4 | LIB=/opt/app/aaf/authz-service/lib |
sg481n | dc5fcf1 | 2017-09-15 13:06:30 -0400 | [diff] [blame] | 5 | |
sg481n | a2ac678 | 2017-09-18 16:35:50 -0400 | [diff] [blame] | 6 | ETC=/opt/app/aaf/authz-service/etc |
sg481n | dc5fcf1 | 2017-09-15 13:06:30 -0400 | [diff] [blame] | 7 | DME2REG=/opt/dme2reg |
| 8 | |
| 9 | echo "this is LIB" $LIB |
| 10 | echo "this is ETC" $ETC |
| 11 | echo "this is DME2REG" $DME2REG |
| 12 | |
| 13 | CLASSPATH=$ETC |
| 14 | for FILE in `find $LIB -name *.jar`; do |
| 15 | CLASSPATH=$CLASSPATH:$FILE |
| 16 | done |
sg481n | a2ac678 | 2017-09-18 16:35:50 -0400 | [diff] [blame] | 17 | |
| 18 | FILEPATHS="/opt/app/aaf/authz-service/etc/com.osaaf.common.props /opt/app/aaf/authz-service/etc/com.osaaf.common.props" |
| 19 | for FILEPATH in $FILEPATHS: |
| 20 | do |
| 21 | if [ -e ${FILEPATH} ]; then |
| 22 | if [ -z `grep "cassandra.clusters=$CASSANDRA_CLUSTER" $FILEPATH` ]; then |
| 23 | echo "cassandra.clusters=$CASSANDRA_CLUSTER" >> $FILEPATH; |
| 24 | fi |
| 25 | fi |
| 26 | done |
| 27 | |
| 28 | |
sg481n | dc5fcf1 | 2017-09-15 13:06:30 -0400 | [diff] [blame] | 29 | java -classpath $CLASSPATH -DDME2_EP_REGISTRY_CLASS=DME2FS -DAFT_DME2_EP_REGISTRY_FS_DIR=$DME2REG org.onap.aaf.authz.service.AuthAPI |
| 30 | |
sg481n | a2ac678 | 2017-09-18 16:35:50 -0400 | [diff] [blame] | 31 | # keet it running so we can check fs |
| 32 | while sleep 2; do echo thinking; done |
sg481n | dc5fcf1 | 2017-09-15 13:06:30 -0400 | [diff] [blame] | 33 | |
| 34 | |