diff options
Diffstat (limited to 'aai-traversal/src/main/resources/docker/docker-entrypoint.sh')
-rw-r--r-- | aai-traversal/src/main/resources/docker/docker-entrypoint.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/aai-traversal/src/main/resources/docker/docker-entrypoint.sh b/aai-traversal/src/main/resources/docker/docker-entrypoint.sh index f69e468..0310b24 100644 --- a/aai-traversal/src/main/resources/docker/docker-entrypoint.sh +++ b/aai-traversal/src/main/resources/docker/docker-entrypoint.sh @@ -67,9 +67,15 @@ if [ -z ${DISABLE_UPDATE_QUERY} ]; then UPDATE_QUERY_RAN_FILE="updateQueryRan.txt"; + AAICONFIG_FILE=/opt/app/aai-traversal/bundleconfig/etc/appprops/aaiconfig.properties; + if [ ! -f ${UPDATE_QUERY_RAN_FILE} ]; then + OLD_RESOURCES_URL=$(grep -o "^aai.server.url=.*" ${AAICONFIG_FILE} | cut -d"=" -f2-); + TEMP_RESOURCES_URL=https://${RESOURCES_HOSTNAME}:${RESOURCES_PORT}; + sed -i "s%^aai.server.url=.*$%aai.server.url=${TEMP_RESOURCES_URL}%g" ${AAICONFIG_FILE}; gosu aaiadmin /opt/app/aai-traversal/bin/install/updateQueryData.sh touch ${UPDATE_QUERY_RAN_FILE}; + sed -i "s%^aai.server.url=.*$%aai.server.url=${OLD_RESOURCES_URL}%g" ${AAICONFIG_FILE}; fi fi |